@yhong91/cpac 0.1.13 → 0.1.14

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 +36 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@ CPAC 将 Codex 和 Claude Code 接入远端 CLIProxyAPI(CPA):
10
10
  ## 要求
11
11
 
12
12
  - [Node.js](https://nodejs.org/) 20 或更新版本(npm 随 Node 安装)
13
- - 已安装需要使用的 agent:`codex` 或 `claude`
13
+ - 已安装需要使用的 agent:`codex`、`claude`、`pi`、`kimi` 或 `opencode`
14
14
  - 有权访问的 CPA API key
15
15
 
16
16
  ## 安装
@@ -31,6 +31,41 @@ npm install -g .
31
31
  cpac
32
32
  ```
33
33
 
34
+ ## 快速上手
35
+
36
+ ```bash
37
+ # 1. 安装
38
+ npm install -g @yhong91/cpac
39
+
40
+ # 2. 配置密钥:无参数运行进入交互引导,自动写入 shell 启动文件;
41
+ # 也可手动写入(zsh 示例):
42
+ cpac
43
+ echo 'export CPA_API_KEY="<你的key>"' >> ~/.zshrc && source ~/.zshrc
44
+
45
+ # 3. 验证
46
+ cpac status
47
+
48
+ # 4a. 持久注入(长期生效,写入 agent 配置,可完整恢复)
49
+ cpac install --all # 注入所有检测到的目标(codex/pi/kimi)
50
+ cpac install --target codex # 只注入 Codex(默认开启 multi-agent v2)
51
+ cpac install --target codex --v2_models # 先多选 spawn_agent 模型再注入
52
+ cpac uninstall --target codex # 字节级恢复原配置
53
+
54
+ # 4b. 临时接管(退出无痕,不写任何配置文件)
55
+ cpac claude # Claude Code 走 CPA
56
+ cpac opencode # opencode 走 CPA(模型选 cpac/<模型名>)
57
+
58
+ # 5. 可选:Claude 模型槽位配置(持久缓存,每次 cpac claude 自动生效)
59
+ cpac claude-models --haiku # 下拉选择 haiku 槽模型
60
+ cpac claude-models --classifier <模型> # Auto mode 审批分类器模型
61
+
62
+ # 6. 升级
63
+ cpac upgrade --check
64
+ npm install -g @yhong91/cpac@latest
65
+ ```
66
+
67
+ 各命令的完整参数与行为见下方对应章节。
68
+
34
69
  ## 首次引导
35
70
 
36
71
  无参数运行 `cpac` 会显示当前 CPA、密钥状态和可用命令:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yhong91/cpac",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Connect Codex and Claude Code to a remote CLIProxyAPI gateway",
5
5
  "type": "module",
6
6
  "bin": {