cc-pets 0.2.5 → 0.2.6

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.
Files changed (2) hide show
  1. package/README.md +18 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -90,19 +90,32 @@ Claude Code Hook 会合并到 `~/.claude/settings.json`,现有的 `env`、`mod
90
90
  ### npm 安装
91
91
 
92
92
  ```bash
93
- npm install -g cc-pets@latest
93
+ npm install -g cc-pets@latest \
94
+ --allow-scripts=cc-pets \
95
+ --prefer-online
94
96
  # 首次安装后新开一个终端
95
97
  codex
96
98
  # 或
97
99
  claude
98
100
  ```
99
101
 
102
+ `--allow-scripts=cc-pets` 用于允许新版 npm 执行 CC Pets 的 `postinstall`,完成原生应用构建、
103
+ Hooks、shell alias 和 `~/Applications/CC Pets.app` 的安装;`--prefer-online` 会优先向 npm Registry
104
+ 检查 `latest`,减少刚发布新版本时命中旧元数据缓存的概率。
105
+
106
+ 如果已经只执行了 `npm install -g cc-pets@latest`,并看到 npm 提示安装脚本尚未获准,
107
+ 可以在包安装完成后手动初始化:
108
+
109
+ ```bash
110
+ cc-pets install
111
+ ```
112
+
100
113
  ### 本地源码安装
101
114
 
102
115
  ```bash
103
116
  git clone https://gitee.com/wangxinyusqn/cc-pets.git
104
117
  cd cc-pets
105
- npm install -g .
118
+ npm install -g . --allow-scripts=cc-pets
106
119
  # 首次安装后新开一个终端
107
120
  codex
108
121
  # 或
@@ -120,7 +133,9 @@ npm 的安装后脚本会自动构建原生应用、安装两套 Agent Hooks,
120
133
  从使用 `codex-pet` 命令的旧版升级时,直接安装新版即可:
121
134
 
122
135
  ```bash
123
- npm install -g cc-pets@latest
136
+ npm install -g cc-pets@latest \
137
+ --allow-scripts=cc-pets \
138
+ --prefer-online
124
139
  ```
125
140
 
126
141
  新版安装器会自动移除旧版 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.5",
3
+ "version": "0.2.6",
4
4
  "description": "A native macOS desktop pet for Codex CLI and Claude Code",
5
5
  "author": "wangxinyusqn",
6
6
  "license": "MIT",