cc-pets 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -36,8 +36,8 @@ Agent 动画分别由 Codex Hooks 和 Claude Code Hooks 驱动。首次安装或
|
|
|
36
36
|
Claude Code Hook 会合并到 `~/.claude/settings.json`,现有的 `env`、`model`、`statusLine`
|
|
37
37
|
以及其他 Hooks 都会保留。Claude status line 会通过透明转发器继续执行原命令,同时将官方
|
|
38
38
|
`rate_limits` 字段提供给桌宠。
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
通过 npm 安装或升级时会自动重新构建应用、安装或更新两套 Hooks,并配置 shell alias;如果旧版桌宠正在运行,
|
|
40
|
+
安装器会自动重启桌宠,使新版本生效。`cc-pets install` 保留为手动修复和重新初始化命令。
|
|
41
41
|
|
|
42
42
|
### 鼠标互动
|
|
43
43
|
|
|
@@ -90,9 +90,8 @@ Claude Code Hook 会合并到 `~/.claude/settings.json`,现有的 `env`、`mod
|
|
|
90
90
|
### npm 安装
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
|
-
npm install -g cc-pets
|
|
94
|
-
|
|
95
|
-
source ~/.zshrc
|
|
93
|
+
npm install -g cc-pets@latest
|
|
94
|
+
# 首次安装后新开一个终端
|
|
96
95
|
codex
|
|
97
96
|
# 或
|
|
98
97
|
claude
|
|
@@ -104,25 +103,22 @@ claude
|
|
|
104
103
|
git clone https://gitee.com/wangxinyusqn/cc-pets.git
|
|
105
104
|
cd cc-pets
|
|
106
105
|
npm install -g .
|
|
107
|
-
|
|
108
|
-
source ~/.zshrc
|
|
106
|
+
# 首次安装后新开一个终端
|
|
109
107
|
codex
|
|
110
108
|
# 或
|
|
111
109
|
claude
|
|
112
110
|
```
|
|
113
111
|
|
|
114
112
|
两种方式都会安装 `cc-pets`、`codex-with-pet` 和 `claude-with-pet`。
|
|
115
|
-
|
|
116
|
-
`codex` 与 `claude` alias,不会覆盖真实的 CLI
|
|
113
|
+
npm 的安装后脚本会自动构建原生应用、安装两套 Agent Hooks,并向 `~/.zshrc` 追加带明确标记的
|
|
114
|
+
`codex` 与 `claude` alias,不会覆盖真实的 CLI 二进制。首次安装需要新开终端让 alias 生效;以后升级只需执行 npm 命令。
|
|
117
115
|
|
|
118
116
|
### 从旧版升级
|
|
119
117
|
|
|
120
|
-
从使用 `codex-pet`
|
|
118
|
+
从使用 `codex-pet` 命令的旧版升级时,直接安装新版即可:
|
|
121
119
|
|
|
122
120
|
```bash
|
|
123
121
|
npm install -g cc-pets@latest
|
|
124
|
-
cc-pets install
|
|
125
|
-
source ~/.zshrc
|
|
126
122
|
```
|
|
127
123
|
|
|
128
124
|
新版安装器会自动移除旧版 Hooks、恢复并重新接入 Claude status line,同时替换旧的 shell alias 标记,
|
|
@@ -159,7 +155,7 @@ cc-pets --foreground
|
|
|
159
155
|
# 查看当前解析到的 Codex 额度
|
|
160
156
|
cc-pets --status
|
|
161
157
|
|
|
162
|
-
#
|
|
158
|
+
# 手动修复或重新初始化 Hooks、shell alias,并让已运行桌宠加载当前版本
|
|
163
159
|
cc-pets install
|
|
164
160
|
|
|
165
161
|
# 安全移除 Hooks、恢复 Claude status line,并清理 shell alias
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc-pets",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "A native macOS desktop pet for Codex CLI and Claude Code",
|
|
5
5
|
"author": "wangxinyusqn",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "./scripts/build.sh",
|
|
50
50
|
"test": "./tests/test.sh",
|
|
51
|
-
"postinstall": "./scripts/
|
|
51
|
+
"postinstall": "./scripts/install-shell-integration.sh",
|
|
52
52
|
"prepack": "npm test"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|