@unitsvc/cc-helper 1.0.18 → 1.0.20

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 (3) hide show
  1. package/README-zh.md +219 -135
  2. package/README.md +223 -151
  3. package/package.json +1 -1
package/README-zh.md CHANGED
@@ -1,22 +1,58 @@
1
1
  # cc-helper
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@unitsvc/cc-helper.svg)](https://www.npmjs.com/package/@unitsvc/cc-helper)
4
- [![License](https://img.shields.io/badge/License-AGPL%203.0-blue.svg)](https://github.com/next-bin/cc-helper/blob/master/LICENSE)
5
- [![Node](https://img.shields.io/badge/Node-%3E%3D14.0.0-green.svg)](https://nodejs.org)
3
+ [![npm version](https://img.shields.io/npm/v/@unitsvc/cc-helper.svg)](https://www.npmjs.com/package/@unitsvc/cc-helper) [![License](https://img.shields.io/badge/License-AGPL%203.0-blue.svg)](https://github.com/next-bin/cc-helper/blob/master/LICENSE) [![Node](https://img.shields.io/badge/Node-%3E%3D14.0.0-green.svg)](https://nodejs.org) [![CLAUDE](https://img.shields.io/badge/Claude%20Code-v2.1.71%2B-green.svg)](https://docs.anthropic.com/en/docs/claude-code)
6
4
 
7
- [**English**](./README.md) | **简体中文**
5
+ [**English**](./README.md) | [**简体中文**](./README-zh.md)
8
6
 
9
- > 一键启用 Claude Code CLI 的隐藏功能:`/loop`、`/btw`、`/keybindings`、`/context1m` 和 `MCPSearch`
7
+ > 一键解锁 Claude Code 隐藏超能力:`/loop`、`/btw`、`/keybindings`、`/context1m` 和 `MCPSearch`
8
+
9
+ ## 目录
10
+
11
+ | 分类 | 内容 |
12
+ | ------------ | --------------------------------------------------------------------------------------------------------------------------- |
13
+ | **快速开始** | [环境要求](#环境要求) · [安装](#安装) · [使用方法](#使用方法) · [命令说明](#命令说明) |
14
+ | **核心功能** | [`/loop`](#什么是-loop) · [`/btw`](#什么是-btw) · [`/keybindings`](#什么是-keybindings) · [`/context1m`](#什么是-context1m) |
15
+ | **工具搜索** | [概述](#什么是工具搜索) · [配置说明](#配置说明) |
16
+ | **配置命令** | [plan](#plan-命令) · [vault](#vault-命令) · [env](#env-命令) · [sync](#sync-命令) |
17
+ | **更多** | [功能特点](#功能特点) · [支持平台](#支持平台) · [许可证](#许可证) · [安全](#安全) |
18
+
19
+ ---
10
20
 
11
21
  ## 环境要求
12
22
 
13
- - Node.js >= 14.0.0
14
- - Claude Code v2.1.71+
23
+ | 项目 | 版本 |
24
+ | ----------- | --------- |
25
+ | Node.js | >= 14.0.0 |
26
+ | Claude Code | v2.1.71+ |
15
27
 
16
28
  ```bash
17
29
  npm install -g @anthropic-ai/claude-code@v2.1.76
18
30
  ```
19
31
 
32
+ ## 安装
33
+
34
+ 两种使用方式(二选一):
35
+
36
+ ```bash
37
+ # 全局安装(可选)
38
+ npm install -g @unitsvc/cc-helper@latest
39
+
40
+ # 或直接运行,无需安装
41
+ npx @unitsvc/cc-helper@latest enable
42
+ ```
43
+
44
+ ### 代理支持
45
+
46
+ 如果下载失败,使用 `--proxy` 参数:
47
+
48
+ ```bash
49
+ # 使用默认代理
50
+ npx @unitsvc/cc-helper --proxy enable
51
+
52
+ # 使用自定义代理
53
+ npx @unitsvc/cc-helper --proxy https://your-proxy.com enable
54
+ ```
55
+
20
56
  ## 使用方法
21
57
 
22
58
  ```bash
@@ -33,46 +69,47 @@ npx @unitsvc/cc-helper enable context1m # 别名: 1m, 1M
33
69
  # 查看状态
34
70
  npx @unitsvc/cc-helper status
35
71
 
36
- # 禁用功能(恢复原状)
72
+ # 禁用所有功能
37
73
  npx @unitsvc/cc-helper disable
38
74
  ```
39
75
 
40
- ### 命令说明
41
-
42
- | 命令 | 说明 |
43
- | -------------------- | -------------------------------------------------------------- |
44
- | `enable` | 启用 `/loop`、`/btw` 和 `/keybindings` 功能(默认) |
45
- | `enable loop` | 仅启用 `/loop` 功能 |
46
- | `enable btw` | 仅启用 `/btw` 功能 |
47
- | `enable keybindings` | 仅启用 `/keybindings` 功能 |
48
- | `enable toolsearch` | 启用 toolsearch 功能(需要显式激活) |
49
- | `enable context1m` | 启用 1M 上下文窗口,用于 Claude Opus(v2.1.76+,需要显式激活) |
50
- | `disable` | 恢复原始状态 |
51
- | `status` | 查看当前状态及版本要求 |
52
-
53
- **注意**: 运行 `cc-helper enable` 时会自动在 `~/.claude/settings.json` 中配置推荐的环境变量:
54
-
55
- - `DISABLE_INSTALLATION_CHECKS=1` - 禁用 npm 安装警告
56
- - `DISABLE_AUTOUPDATER=1` - 禁用自动更新
57
- - `DISABLE_BUG_COMMAND=1` - 禁用 bug 命令
58
- - `DISABLE_ERROR_REPORTING=1` - 禁用错误报告
59
- - `DISABLE_TELEMETRY=1` - 禁用遥测
60
- - `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1` - 禁用非必要流量
61
- - `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1` - 禁用反馈调查
62
- - `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` - 启用实验性 Agent Teams
63
- - `CLAUDE_CODE_HIDE_ACCOUNT_INFO=1` - 隐藏账户信息
64
- - `API_TIMEOUT_MS=3000000` - 设置 API 超时为 50 分钟
76
+ ## 命令说明
77
+
78
+ | 命令 | 说明 |
79
+ | -------------------- | -------------------------------------------- |
80
+ | `enable` | 启用 `/loop`、`/btw`、`/keybindings`(默认) |
81
+ | `enable loop` | 仅启用 `/loop` |
82
+ | `enable btw` | 仅启用 `/btw` |
83
+ | `enable keybindings` | 仅启用 `/keybindings` |
84
+ | `enable toolsearch` | 启用 toolsearch(需要显式激活) |
85
+ | `enable context1m` | 启用 1M 上下文(v2.1.76+) |
86
+ | `disable` | 恢复原始状态 |
87
+ | `status` | 查看当前状态及版本要求 |
88
+
89
+ > **注意**: 运行 `cc-helper enable` 时会自动在 `~/.claude/settings.json` 中配置推荐的环境变量:
90
+ >
91
+ > ```json
92
+ > {
93
+ > "env": {
94
+ > "DISABLE_INSTALLATION_CHECKS": "1",
95
+ > "DISABLE_AUTOUPDATER": "1",
96
+ > "DISABLE_BUG_COMMAND": "1",
97
+ > "DISABLE_ERROR_REPORTING": "1",
98
+ > "DISABLE_TELEMETRY": "1",
99
+ > "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
100
+ > "CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY": "1",
101
+ > "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
102
+ > "CLAUDE_CODE_HIDE_ACCOUNT_INFO": "1",
103
+ > "API_TIMEOUT_MS": "3000000"
104
+ > }
105
+ > }
106
+ > ```
65
107
 
66
108
  ---
67
109
 
68
110
  ## 什么是 `/loop`?
69
111
 
70
- `/loop` 是 Claude Code CLI 的内置命令,用于创建定时重复提示。适用于:
71
-
72
- - 轮询部署或构建状态
73
- - 监控 PR 状态
74
- - 设置提醒
75
- - 定时执行工作流
112
+ 定时重复提示,适用于轮询部署、监控 PR、设置提醒、定时执行工作流。
76
113
 
77
114
  ### 使用语法
78
115
 
@@ -90,20 +127,20 @@ npx @unitsvc/cc-helper disable
90
127
 
91
128
  ### 间隔时间格式
92
129
 
93
- | 形式 | 示例 | 解析间隔 |
94
- | ---------- | --------------------------- | -------------- |
95
- | 前置时间 | `/loop 30m check` | 每 30 分钟 |
96
- | 后置 every | `/loop check every 2 hours` | 每 2 小时 |
97
- | 无间隔 | `/loop check` | 默认每 10 分钟 |
130
+ | 形式 | 示例 | 解析间隔 |
131
+ | ---------- | --------------------------- | ------------ |
132
+ | 前置时间 | `/loop 30m check` | 每 30 分钟 |
133
+ | 后置 every | `/loop check every 2 hours` | 每 2 小时 |
134
+ | 无间隔 | `/loop check` | 默认 10 分钟 |
98
135
 
99
136
  支持单位:`s`(秒)、`m`(分)、`h`(时)、`d`(天)
100
137
 
101
138
  ### 核心特性
102
139
 
103
- - **会话级别**:任务仅在当前 Claude Code 会话中存在,退出即消失
104
- - **自动过期**:重复任务 3 天后自动过期
105
- - **抖动保护**:添加小偏移量防止 API 惊群效应
106
- - **低优先级**:定时提示在你与 Claude 交互间隙触发
140
+ - **会话级别**:任务仅在当前会话中存在,退出即消失
141
+ - **自动过期**:3 天后自动过期
142
+ - **抖动保护**:小偏移量防止 API 惊群效应
143
+ - **低优先级**:在你与 Claude 交互间隙触发
107
144
 
108
145
  ### 管理任务
109
146
 
@@ -114,7 +151,7 @@ cancel the deploy check job # 按描述或 ID 取消
114
151
 
115
152
  ## 什么是 `/btw`?
116
153
 
117
- `/btw`(by the way)是一个隐藏命令,用于在不打断主对话流程的情况下提问旁支问题。适合快速澄清疑问。
154
+ 在不打断主对话的情况下提问旁支问题。
118
155
 
119
156
  ### 使用方法
120
157
 
@@ -130,58 +167,92 @@ cancel the deploy check job # 按描述或 ID 取消
130
167
  /btw 为什么这里要用 async/await?
131
168
  ```
132
169
 
170
+ ## 什么是 `/keybindings`?
171
+
172
+ 自定义键盘快捷键。在 `~/.claude/keybindings.json` 中配置:
173
+
174
+ ```json
175
+ {
176
+ "submit": ["ctrl+s"],
177
+ "interrupt": ["ctrl+c"],
178
+ "custom_commands": {
179
+ "ctrl+shift+l": "/loop 5m check status"
180
+ }
181
+ }
182
+ ```
183
+
184
+ ## 什么是 `/context1m`?
185
+
186
+ 为 Claude Opus 模型启用 1M token 上下文窗口。
187
+
188
+ ### 要求
189
+
190
+ - Claude Code v2.1.76 或更高版本
191
+ - Claude Opus 4+ 模型
192
+ - 可能需要 Pro 计划或官方 API
193
+
194
+ ### 使用方法
195
+
196
+ ```bash
197
+ npx @unitsvc/cc-helper enable context1m # 别名: 1m, 1M
198
+ ```
199
+
200
+ ![/context1m 启用](./docs/images/1m-1.png)
201
+
202
+ ### 扩展思维与上下文长度
203
+
204
+ | 模型 | 最大思维链长度 | 上下文长度 |
205
+ | -------------------- | -------------- | ---------- |
206
+ | qwen3.5-plus | 81,920 | 1,000,000 |
207
+ | qwen3-coder-plus | 不支持 | 1,000,000 |
208
+ | qwen3-max-2026-01-23 | 81,920 | 262,144 |
209
+ | qwen3-coder-next | 不支持 | 262,144 |
210
+ | kimi-k2.5 | 81,920 | 262,144 |
211
+ | MiniMax-M2.5 | 32,768 | 204,800 |
212
+ | glm-5 | 32,768 | 202,752 |
213
+ | glm-4.7 | 32,768 | 202,752 |
214
+
215
+ ---
216
+
133
217
  ## 什么是工具搜索?
134
218
 
135
- 工具搜索(Tool Search)是一项允许 Claude 在运行时动态搜索和加载工具的功能,而不是一次性发送所有工具定义。这可以节省 token 并提高性能。
219
+ 在运行时动态搜索和加载工具,而非一次性发送所有工具定义。节省 token 并提高性能。
136
220
 
137
221
  ### 为什么为第三方 API 启用?
138
222
 
139
- 默认情况下,Claude Code 在使用第三方 API 代理(如 Kimi、自定义端点)时会禁用工具搜索。此功能修改该行为,为这些代理启用工具搜索。
223
+ Claude Code 在使用第三方 API 代理时默认禁用工具搜索。此功能为这些代理启用工具搜索。
140
224
 
141
225
  ### 优势
142
226
 
143
- - **Token 效率**:减少大型 MCP 工具目录的上下文窗口占用
144
- - **性能提升**:延迟加载工具,响应更快
145
- - **代理兼容**:支持 Kimi 和其他第三方 Claude API 提供商
227
+ - **Token 效率**:减少大型 MCP 工具目录的上下文占用
228
+ - **性能提升**:延迟加载,响应更快
229
+ - **代理兼容**:支持 Kimi 和其他提供商
146
230
 
147
231
  ### 要求
148
232
 
149
- - 您的代理必须支持 API 响应中的 `tool_reference` 块
233
+ - 代理必须支持 API 响应中的 `tool_reference` 块
150
234
  - 仅支持 Claude Sonnet 4+ 和 Opus 4+ 模型(不支持 Haiku)
151
235
 
152
236
  ### 配置说明
153
237
 
154
- 使用官方 Anthropic API 时,工具搜索默认启用。但当 `ANTHROPIC_BASE_URL` 指向非第一方主机时,工具搜索默认禁用(大多数代理不转发 `tool_reference` 块)。
155
-
156
- 通过 `ENABLE_TOOL_SEARCH` 环境变量控制工具搜索行为:
238
+ 通过 `ENABLE_TOOL_SEARCH` 环境变量控制:
157
239
 
158
- | 值 | 行为 |
159
- | ---------- | ------------------------------------------------------ |
160
- | (未设置) | 默认启用。当 `ANTHROPIC_BASE_URL` 为非第一方主机时禁用 |
161
- | `true` | 始终启用,包括非第一方 `ANTHROPIC_BASE_URL` |
162
- | `auto` | MCP 工具超过上下文 10% 时激活 |
163
- | `auto:<N>` | 自定义阈值激活(如 `auto:5` 表示 5%) |
164
- | `false` | 禁用,所有 MCP 工具预先加载 |
165
-
166
- **示例:**
240
+ | 值 | 行为 |
241
+ | ---------- | --------------------------------- |
242
+ | (未设置) | 默认启用,非第一方主机时禁用 |
243
+ | `true` | 始终启用 |
244
+ | `auto` | MCP 工具超过上下文 10% 时激活 |
245
+ | `auto:<N>` | 自定义阈值(如 `auto:5` 表示 5%) |
246
+ | `false` | 禁用,所有工具预先加载 |
167
247
 
168
248
  ```bash
169
- # 使用 5% 自定义阈值
170
- ENABLE_TOOL_SEARCH=auto:5 claude
171
-
172
- # 完全禁用工具搜索
173
- ENABLE_TOOL_SEARCH=false claude
174
-
175
- # 始终启用(适用于支持 tool_reference 的代理)
176
- ENABLE_TOOL_SEARCH=true claude
249
+ ENABLE_TOOL_SEARCH=auto:5 claude # 5% 阈值
250
+ ENABLE_TOOL_SEARCH=false claude # 禁用
251
+ ENABLE_TOOL_SEARCH=true claude # 始终启用
177
252
  ```
178
253
 
179
- 或在 `settings.json` 的 env 字段中设置。
180
-
181
254
  #### 禁用 MCPSearch 工具
182
255
 
183
- 您还可以使用 `disallowedTools` 设置专门禁用 `MCPSearch` 工具:
184
-
185
256
  ```json
186
257
  {
187
258
  "permissions": {
@@ -190,89 +261,102 @@ ENABLE_TOOL_SEARCH=true claude
190
261
  }
191
262
  ```
192
263
 
193
- ## 什么是 `/keybindings`?
264
+ ---
194
265
 
195
- `/keybindings` 启用自定义键盘快捷键支持。在 `~/.claude/keybindings.json` 中配置您的键绑定。
266
+ ## plan 命令
196
267
 
197
- ### 配置方法
268
+ 配置 AI Provider,支持 vault 加密存储。
198
269
 
199
- 创建或编辑 `~/.claude/keybindings.json`:
270
+ ```bash
271
+ # 添加 Provider(自动保存到 vault + settings.json)
272
+ cc-helper plan add -p bailian -k YOUR_API_KEY
273
+ cc-helper plan add -p minimaxi -k YOUR_API_KEY --mcp
200
274
 
201
- ```json
202
- {
203
- "submit": ["ctrl+s"],
204
- "interrupt": ["ctrl+c"],
205
- "custom_commands": {
206
- "ctrl+shift+l": "/loop 5m check status"
207
- }
208
- }
209
- ```
275
+ # 切换 Provider
276
+ cc-helper plan switch -p zai
210
277
 
211
- ## 什么是 `/context1m`?
278
+ # 列出 Provider
279
+ cc-helper plan list
212
280
 
213
- `/context1m` 为 Claude Opus 模型启用 1M token 上下文窗口。这允许您处理更大的代码库和更长的对话。
281
+ # 导出配置
282
+ cc-helper plan export --all-env -o config.json
283
+ ```
214
284
 
215
- ### 要求
285
+ **支持的 Provider:**
216
286
 
217
- - Claude Code v2.1.76 或更高版本
218
- - Claude Opus 4+ 模型
219
- - 可能需要 Pro 计划或官方 API
287
+ | Provider | 说明 |
288
+ | ---------- | ------------ |
289
+ | `bailian` | (CN) Aliyun |
290
+ | `minimaxi` | (CN) MiniMax |
291
+ | `glm` | (CN) Zhipu |
292
+ | `zai` | (EN) Zhipu |
220
293
 
221
- ### 使用方法
294
+ ## vault 命令
295
+
296
+ 安全的密钥存储,加密存储在 `cc-helper.json` 中。
222
297
 
223
298
  ```bash
224
- # 启用 1M 上下文
225
- npx @unitsvc/cc-helper enable context1m
299
+ cc-helper vault list # 列出密钥
300
+ cc-helper vault set bailian default -k "KEY" # 设置
301
+ cc-helper vault get bailian default # 获取并解密
302
+ cc-helper vault delete bailian default # 删除
303
+ ```
226
304
 
227
- # 或使用别名
228
- npx @unitsvc/cc-helper enable 1m
229
- npx @unitsvc/cc-helper enable 1M
305
+ ## env 命令
306
+
307
+ 多环境配置(default、work、staging 等)。
308
+
309
+ ```bash
310
+ cc-helper env list # 列出环境
311
+ cc-helper env create work # 创建
312
+ cc-helper env switch work # 切换
230
313
  ```
231
314
 
232
- ### 扩展思维与上下文长度
315
+ ## sync 命令
233
316
 
234
- 使用第三方 API 代理时,扩展思维(推理)能力和上下文窗口大小因模型而异:
317
+ 将配置导出/导入到 Git 仓库,支持 JWE 加密。
235
318
 
236
- | 模型 | 最大思维链长度 | 上下文长度(Tokens) |
237
- | -------------------- | ----------------------- | -------------------- |
238
- | qwen3.5-plus | 81,920 | 1,000,000 |
239
- | qwen3-coder-plus | 不支持思考模式 | 1,000,000 |
240
- | qwen3-max-2026-01-23 | 81,920 | 262,144 |
241
- | qwen3-coder-next | 不支持思考模式 | 262,144 |
242
- | kimi-k2.5 | 81,920 | 262,144 |
243
- | MiniMax-M2.5 | 32,768(思维链 + 回复) | 204,800 |
244
- | glm-5 | 32,768 | 202,752 |
245
- | glm-4.7 | 32,768 | 202,752 |
319
+ ```bash
320
+ # 登录 GitHub
321
+ cc-helper sync login -r https://github.com/user/repo -t ghp_xxx
246
322
 
247
- ## 功能特点
323
+ # 导出
324
+ cc-helper sync export
325
+ cc-helper sync export --file config.json
326
+ cc-helper sync export --workspace test
248
327
 
249
- - 一键启用 `/loop`、`/btw`、`/keybindings` 功能
250
- - 可选 `/toolsearch` 用于第三方 API 代理
251
- - 可选 `/context1m` 用于 1M 上下文窗口(v2.1.76+)
252
- - 可单独启用特定功能
253
- - 轻松恢复原始状态
254
- - 自动备份原文件
255
- - 自动禁用 npm 弃用警告
256
- - 自动跳过入门引导流程
257
- - 零运行时依赖
258
- - 跨平台支持
259
- - 支持版本:2.1.71 - 2.1.76+
328
+ # 导入
329
+ cc-helper sync import
330
+ ```
260
331
 
261
- ### 示例
332
+ ---
262
333
 
263
- 启用后,在 Claude Code 中使用 `/loop` 命令:
334
+ ## 功能特点
264
335
 
265
- ![/loop 命令提示](./docs/images/loop-1.png)
336
+ | 功能 | 说明 |
337
+ | ------------- | -------------------------------------------- |
338
+ | 一键启用 | 启用 `/loop`、`/btw`、`/keybindings` |
339
+ | 工具搜索 | 可选 `/toolsearch` 用于第三方 API 代理 |
340
+ | 1M 上下文 | 可选 `/context1m` 用于 1M 上下文(v2.1.76+) |
341
+ | Provider 配置 | `plan` 命令支持 vault 加密存储 |
342
+ | 密钥管理 | `vault` 命令安全管理密钥 |
343
+ | 多环境支持 | `env` 命令环境切换 |
344
+ | Git 同步 | `sync` 命令配置同步 |
345
+ | 轻松恢复 | 自动备份和恢复 |
346
+ | 零依赖 | 无运行时依赖 |
266
347
 
267
- 执行 loop 命令示例:
348
+ ### 截图
268
349
 
350
+ ![/loop 命令提示](./docs/images/loop-1.png)
269
351
  ![/loop 执行示例](./docs/images/loop-2.png)
270
352
 
271
353
  ## 支持平台
272
354
 
273
- - macOS (amd64, arm64)
274
- - Linux (amd64, arm64)
275
- - Windows (amd64, arm64)
355
+ | 平台 | 架构 |
356
+ | ------- | ------------ |
357
+ | macOS | amd64, arm64 |
358
+ | Linux | amd64, arm64 |
359
+ | Windows | amd64, arm64 |
276
360
 
277
361
  ## 许可证
278
362
 
package/README.md CHANGED
@@ -1,22 +1,58 @@
1
1
  # cc-helper
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/@unitsvc/cc-helper.svg)](https://www.npmjs.com/package/@unitsvc/cc-helper)
4
- [![License](https://img.shields.io/badge/License-AGPL%203.0-blue.svg)](https://github.com/next-bin/cc-helper/blob/master/LICENSE)
5
- [![Node](https://img.shields.io/badge/Node-%3E%3D14.0.0-green.svg)](https://nodejs.org)
3
+ [![npm version](https://img.shields.io/npm/v/@unitsvc/cc-helper.svg)](https://www.npmjs.com/package/@unitsvc/cc-helper) [![License](https://img.shields.io/badge/License-AGPL%203.0-blue.svg)](https://github.com/next-bin/cc-helper/blob/master/LICENSE) [![Node](https://img.shields.io/badge/Node-%3E%3D14.0.0-green.svg)](https://nodejs.org) [![CLAUDE](https://img.shields.io/badge/Claude%20Code-v2.1.71%2B-green.svg)](https://docs.anthropic.com/en/docs/claude-code)
6
4
 
7
- **English** | [**简体中文**](./README-zh.md)
5
+ [**English**](./README.md) | [**简体中文**](./README-zh.md)
8
6
 
9
- > Enable hidden features in Claude Code CLI with one command: `/loop`, `/btw`, `/keybindings`, `/context1m`, and `MCPSearch`
7
+ > One command to unlock Claude Code's hidden superpowers: `/loop`, `/btw`, `/keybindings`, `/context1m`, and `MCPSearch`
8
+
9
+ ## Table of Contents
10
+
11
+ | Category | Content |
12
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
13
+ | **Quick Start** | [Requirements](#requirements) · [Installation](#installation) · [Usage](#usage) · [Commands](#commands) |
14
+ | **Core Features** | [`/loop`](#what-is-loop) · [`/btw`](#what-is-btw) · [`/keybindings`](#what-is-keybindings) · [`/context1m`](#what-is-context1m) |
15
+ | **Tool Search** | [Overview](#what-is-tool-search) · [Configuration](#configuration) |
16
+ | **Commands** | [plan](#plan-command) · [vault](#vault-command) · [env](#env-command) · [sync](#sync-command) |
17
+ | **More** | [Features](#features) · [Platforms](#platforms) · [License](#license) · [Security](#security) |
18
+
19
+ ---
10
20
 
11
21
  ## Requirements
12
22
 
13
- - Node.js >= 14.0.0
14
- - Claude Code v2.1.71+
23
+ | Item | Version |
24
+ | ----------- | --------- |
25
+ | Node.js | >= 14.0.0 |
26
+ | Claude Code | v2.1.71+ |
15
27
 
16
28
  ```bash
17
29
  npm install -g @anthropic-ai/claude-code@v2.1.76
18
30
  ```
19
31
 
32
+ ## Installation
33
+
34
+ Two ways to use (choose one):
35
+
36
+ ```bash
37
+ # Install globally (optional)
38
+ npm install -g @unitsvc/cc-helper@latest
39
+
40
+ # Or run directly without installation
41
+ npx @unitsvc/cc-helper@latest enable
42
+ ```
43
+
44
+ ### Proxy Support
45
+
46
+ If download fails, use `--proxy` flag:
47
+
48
+ ```bash
49
+ # Use default proxy
50
+ npx @unitsvc/cc-helper --proxy enable
51
+
52
+ # Use custom proxy
53
+ npx @unitsvc/cc-helper --proxy https://your-proxy.com enable
54
+ ```
55
+
20
56
  ## Usage
21
57
 
22
58
  ```bash
@@ -33,58 +69,47 @@ npx @unitsvc/cc-helper enable context1m # or: 1m, 1M
33
69
  # Check status
34
70
  npx @unitsvc/cc-helper status
35
71
 
36
- # Disable all features (restore original)
72
+ # Disable all features
37
73
  npx @unitsvc/cc-helper disable
38
74
  ```
39
75
 
40
- ### Commands
41
-
42
- | Command | Description |
43
- | -------------------- | -------------------------------------------------------------------- |
44
- | `enable` | Enable `/loop`, `/btw`, and `/keybindings` features (default) |
45
- | `enable loop` | Enable only `/loop` feature |
46
- | `enable btw` | Enable only `/btw` feature |
47
- | `enable keybindings` | Enable only `/keybindings` feature |
48
- | `enable toolsearch` | Enable toolsearch feature (requires explicit activation) |
49
- | `enable context1m` | Enable 1M context window for Claude Opus (v2.1.76+, explicit opt-in) |
50
- | `disable` | Restore original |
51
- | `status` | Check current status with version requirements |
52
-
53
- **Note**: Running `cc-helper enable` also automatically configures recommended environment variables in `~/.claude/settings.json`:
54
-
55
- - `DISABLE_INSTALLATION_CHECKS=1` - Disable npm installation warnings
56
- - `DISABLE_AUTOUPDATER=1` - Disable auto-updater
57
- - `DISABLE_BUG_COMMAND=1` - Disable bug command
58
- - `DISABLE_ERROR_REPORTING=1` - Disable error reporting
59
- - `DISABLE_TELEMETRY=1` - Disable telemetry
60
- - `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1` - Disable non-essential traffic
61
- - `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1` - Disable feedback survey
62
- - `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` - Enable experimental agent teams
63
- - `CLAUDE_CODE_HIDE_ACCOUNT_INFO=1` - Hide account info
64
- - `API_TIMEOUT_MS=3000000` - Set API timeout to 50 minutes
65
-
66
- ### Proxy Support
67
-
68
- If download fails, use `--proxy` flag:
69
-
70
- ```bash
71
- # Use default proxy (https://edgeone.gh-proxy.org)
72
- npx @unitsvc/cc-helper --proxy enable
73
-
74
- # Use custom proxy
75
- npx @unitsvc/cc-helper --proxy https://your-proxy.com enable
76
- ```
76
+ ## Commands
77
+
78
+ | Command | Description |
79
+ | -------------------- | ---------------------------------------------------- |
80
+ | `enable` | Enable `/loop`, `/btw`, and `/keybindings` (default) |
81
+ | `enable loop` | Enable only `/loop` |
82
+ | `enable btw` | Enable only `/btw` |
83
+ | `enable keybindings` | Enable only `/keybindings` |
84
+ | `enable toolsearch` | Enable toolsearch (requires explicit activation) |
85
+ | `enable context1m` | Enable 1M context for Claude Opus (v2.1.76+) |
86
+ | `disable` | Restore original |
87
+ | `status` | Check current status with version requirements |
88
+
89
+ > **Note**: Running `cc-helper enable` also automatically configures recommended environment variables in `~/.claude/settings.json`:
90
+ >
91
+ > ```json
92
+ > {
93
+ > "env": {
94
+ > "DISABLE_INSTALLATION_CHECKS": "1",
95
+ > "DISABLE_AUTOUPDATER": "1",
96
+ > "DISABLE_BUG_COMMAND": "1",
97
+ > "DISABLE_ERROR_REPORTING": "1",
98
+ > "DISABLE_TELEMETRY": "1",
99
+ > "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
100
+ > "CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY": "1",
101
+ > "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
102
+ > "CLAUDE_CODE_HIDE_ACCOUNT_INFO": "1",
103
+ > "API_TIMEOUT_MS": "3000000"
104
+ > }
105
+ > }
106
+ > ```
77
107
 
78
108
  ---
79
109
 
80
110
  ## What is `/loop`?
81
111
 
82
- `/loop` is a built-in command in Claude Code CLI that lets you schedule recurring prompts. It's useful for:
83
-
84
- - Polling deployments or builds
85
- - Babysitting PRs
86
- - Setting reminders
87
- - Running workflows on an interval
112
+ Schedule recurring prompts for polling deployments, babysitting PRs, setting reminders, or running workflows on an interval.
88
113
 
89
114
  ### Usage Syntax
90
115
 
@@ -102,20 +127,20 @@ npx @unitsvc/cc-helper --proxy https://your-proxy.com enable
102
127
 
103
128
  ### Interval Formats
104
129
 
105
- | Form | Example | Parsed Interval |
106
- | ----------------------- | --------------------------- | ---------------------------- |
107
- | Leading token | `/loop 30m check` | every 30 minutes |
108
- | Trailing `every` clause | `/loop check every 2 hours` | every 2 hours |
109
- | No interval | `/loop check` | defaults to every 10 minutes |
130
+ | Form | Example | Parsed Interval |
131
+ | ---------------- | --------------------------- | ---------------------- |
132
+ | Leading token | `/loop 30m check` | every 30 minutes |
133
+ | Trailing `every` | `/loop check every 2 hours` | every 2 hours |
134
+ | No interval | `/loop check` | defaults to 10 minutes |
110
135
 
111
136
  Supported units: `s` (seconds), `m` (minutes), `h` (hours), `d` (days)
112
137
 
113
138
  ### Key Features
114
139
 
115
- - **Session-scoped**: Tasks live in the current Claude Code session and are gone when you exit
116
- - **Auto-expiry**: Recurring tasks expire after 3 days
117
- - **Jitter protection**: Adds small offsets to prevent API thundering herd
118
- - **Low priority**: Scheduled prompts fire between your turns, not while Claude is busy
140
+ - **Session-scoped**: Tasks live in the current session and disappear on exit
141
+ - **Auto-expiry**: Tasks expire after 3 days
142
+ - **Jitter protection**: Small offsets prevent API thundering herd
143
+ - **Low priority**: Fires between your turns, not while Claude is busy
119
144
 
120
145
  ### Managing Tasks
121
146
 
@@ -126,7 +151,7 @@ cancel the deploy check job # Cancel by description or ID
126
151
 
127
152
  ## What is `/btw`?
128
153
 
129
- `/btw` (by the way) is a hidden command for asking side questions without disrupting the main conversation flow. Perfect for quick clarifications.
154
+ Ask side questions without disrupting the main conversation flow.
130
155
 
131
156
  ### Usage
132
157
 
@@ -142,57 +167,91 @@ cancel the deploy check job # Cancel by description or ID
142
167
  /btw why use async/await in this case?
143
168
  ```
144
169
 
145
- ## What is Tool Search?
146
-
147
- Tool Search is a feature that allows Claude to dynamically search and load tools at runtime instead of sending all tool definitions upfront. This saves tokens and improves performance.
170
+ ## What is `/keybindings`?
148
171
 
149
- ### Why Enable for Third-Party APIs?
172
+ Custom keyboard shortcuts. Configure in `~/.claude/keybindings.json`:
150
173
 
151
- By default, Claude Code disables Tool Search when using third-party API proxies (like Kimi, custom endpoints). This feature patches that behavior to enable Tool Search for these proxies.
174
+ ```json
175
+ {
176
+ "submit": ["ctrl+s"],
177
+ "interrupt": ["ctrl+c"],
178
+ "custom_commands": {
179
+ "ctrl+shift+l": "/loop 5m check status"
180
+ }
181
+ }
182
+ ```
152
183
 
153
- ### Benefits
184
+ ## What is `/context1m`?
154
185
 
155
- - **Token efficiency**: Reduces context window usage for large MCP tool catalogs
156
- - **Better performance**: Faster response times with deferred tool loading
157
- - **Proxy compatibility**: Works with Kimi and other third-party Claude API providers
186
+ Enable 1M token context window for Claude Opus models.
158
187
 
159
188
  ### Requirements
160
189
 
161
- - Your proxy must support `tool_reference` blocks in API responses
162
- - Works with Claude Sonnet 4+ and Opus 4+ models (not Haiku)
190
+ - Claude Code v2.1.76 or higher
191
+ - Claude Opus 4+ model
192
+ - May require Pro plan or first-party API
163
193
 
164
- ### Configuration
194
+ ### Usage
165
195
 
166
- Tool Search is enabled by default when using official Anthropic APIs. However, when `ANTHROPIC_BASE_URL` points to a non-first-party host, Tool Search is disabled by default (most proxies do not forward `tool_reference` blocks).
196
+ ```bash
197
+ npx @unitsvc/cc-helper enable context1m # or: 1m, 1M
198
+ ```
167
199
 
168
- Control Tool Search behavior using the `ENABLE_TOOL_SEARCH` environment variable:
200
+ ![/context1m enable](./docs/images/1m-1.png)
169
201
 
170
- | Value | Behavior |
171
- | ---------- | -------------------------------------------------------------------------------- |
172
- | (unset) | Enabled by default. Disabled when `ANTHROPIC_BASE_URL` is a non-first-party host |
173
- | `true` | Always enabled, including for non-first-party `ANTHROPIC_BASE_URL` |
174
- | `auto` | Activates when MCP tools exceed 10% of context |
175
- | `auto:<N>` | Activates at custom threshold (e.g., `auto:5` for 5%) |
176
- | `false` | Disabled, all MCP tools loaded upfront |
202
+ ### Extended Thinking & Context Length
177
203
 
178
- **Examples:**
204
+ | Model | Max Thinking Tokens | Context Length |
205
+ | -------------------- | ------------------- | -------------- |
206
+ | qwen3.5-plus | 81,920 | 1,000,000 |
207
+ | qwen3-coder-plus | Not supported | 1,000,000 |
208
+ | qwen3-max-2026-01-23 | 81,920 | 262,144 |
209
+ | qwen3-coder-next | Not supported | 262,144 |
210
+ | kimi-k2.5 | 81,920 | 262,144 |
211
+ | MiniMax-M2.5 | 32,768 | 204,800 |
212
+ | glm-5 | 32,768 | 202,752 |
213
+ | glm-4.7 | 32,768 | 202,752 |
179
214
 
180
- ```bash
181
- # Use custom 5% threshold
182
- ENABLE_TOOL_SEARCH=auto:5 claude
215
+ ---
183
216
 
184
- # Disable tool search entirely
185
- ENABLE_TOOL_SEARCH=false claude
217
+ ## What is Tool Search?
186
218
 
187
- # Always enable (useful for proxies that support tool_reference)
188
- ENABLE_TOOL_SEARCH=true claude
189
- ```
219
+ Dynamically search and load tools at runtime instead of sending all tool definitions upfront. Saves tokens and improves performance.
220
+
221
+ ### Why Third-Party APIs?
222
+
223
+ Claude Code disables Tool Search for third-party proxies by default. This feature enables it.
224
+
225
+ ### Benefits
226
+
227
+ - **Token efficiency**: Reduces context usage for large MCP tool catalogs
228
+ - **Better performance**: Faster response with deferred loading
229
+ - **Proxy compatibility**: Works with Kimi and other providers
230
+
231
+ ### Requirements
232
+
233
+ - Proxy must support `tool_reference` blocks
234
+ - Claude Sonnet 4+ or Opus 4+ models only (not Haiku)
235
+
236
+ ### Configuration
190
237
 
191
- Or set the value in your `settings.json` env field.
238
+ Control via `ENABLE_TOOL_SEARCH` environment variable:
192
239
 
193
- #### Disabling MCPSearch Tool
240
+ | Value | Behavior |
241
+ | ---------- | --------------------------------------------------- |
242
+ | (unset) | Default enabled, disabled for non-first-party hosts |
243
+ | `true` | Always enabled |
244
+ | `auto` | Activates when MCP tools exceed 10% of context |
245
+ | `auto:<N>` | Custom threshold (e.g., `auto:5` for 5%) |
246
+ | `false` | Disabled, all tools loaded upfront |
247
+
248
+ ```bash
249
+ ENABLE_TOOL_SEARCH=auto:5 claude # 5% threshold
250
+ ENABLE_TOOL_SEARCH=false claude # Disable
251
+ ENABLE_TOOL_SEARCH=true claude # Always enable
252
+ ```
194
253
 
195
- You can also disable the `MCPSearch` tool specifically using the `disallowedTools` setting:
254
+ #### Disable MCPSearch Tool
196
255
 
197
256
  ```json
198
257
  {
@@ -202,89 +261,102 @@ You can also disable the `MCPSearch` tool specifically using the `disallowedTool
202
261
  }
203
262
  ```
204
263
 
205
- ## What is `/keybindings`?
264
+ ---
206
265
 
207
- `/keybindings` enables custom keyboard shortcuts support. Configure your keybindings in `~/.claude/keybindings.json`.
266
+ ## plan Command
208
267
 
209
- ### Configuration
268
+ Configure AI providers with vault-based secret storage.
210
269
 
211
- Create or edit `~/.claude/keybindings.json`:
270
+ ```bash
271
+ # Add provider (auto-saves to vault + settings.json)
272
+ cc-helper plan add -p bailian -k YOUR_API_KEY
273
+ cc-helper plan add -p minimaxi -k YOUR_API_KEY --mcp
212
274
 
213
- ```json
214
- {
215
- "submit": ["ctrl+s"],
216
- "interrupt": ["ctrl+c"],
217
- "custom_commands": {
218
- "ctrl+shift+l": "/loop 5m check status"
219
- }
220
- }
221
- ```
275
+ # Switch provider
276
+ cc-helper plan switch -p zai
222
277
 
223
- ## What is `/context1m`?
278
+ # List providers
279
+ cc-helper plan list
224
280
 
225
- `/context1m` enables 1M token context window for Claude Opus models. This allows you to work with much larger codebases and conversations.
281
+ # Export config
282
+ cc-helper plan export --all-env -o config.json
283
+ ```
226
284
 
227
- ### Requirements
285
+ **Supported Providers:**
228
286
 
229
- - Claude Code v2.1.76 or higher
230
- - Claude Opus 4+ model
231
- - May require Pro plan or first-party API
287
+ | Provider | Description |
288
+ | ---------- | ------------ |
289
+ | `bailian` | (CN) Aliyun |
290
+ | `minimaxi` | (CN) MiniMax |
291
+ | `glm` | (CN) Zhipu |
292
+ | `zai` | (EN) Zhipu |
232
293
 
233
- ### Usage
294
+ ## vault Command
295
+
296
+ Secure API key storage, encrypted in `cc-helper.json`.
234
297
 
235
298
  ```bash
236
- # Enable 1M context
237
- npx @unitsvc/cc-helper enable context1m
299
+ cc-helper vault list # List secrets
300
+ cc-helper vault set bailian default -k "KEY" # Set
301
+ cc-helper vault get bailian default # Get & decrypt
302
+ cc-helper vault delete bailian default # Delete
303
+ ```
304
+
305
+ ## env Command
238
306
 
239
- # Or use aliases
240
- npx @unitsvc/cc-helper enable 1m
241
- npx @unitsvc/cc-helper enable 1M
307
+ Multiple environments (default, work, staging, etc.).
308
+
309
+ ```bash
310
+ cc-helper env list # List environments
311
+ cc-helper env create work # Create
312
+ cc-helper env switch work # Switch
242
313
  ```
243
314
 
244
- ### Extended Thinking and Context Length
315
+ ## sync Command
245
316
 
246
- When using third-party API proxies, extended thinking (reasoning) capabilities and context window sizes vary by model:
317
+ Export/import config to Git repository with JWE encryption.
247
318
 
248
- | Model | Max Thinking Tokens | Context Length (Tokens) |
249
- | -------------------- | ---------------------------- | ----------------------- |
250
- | qwen3.5-plus | 81,920 | 1,000,000 |
251
- | qwen3-coder-plus | Not supported | 1,000,000 |
252
- | qwen3-max-2026-01-23 | 81,920 | 262,144 |
253
- | qwen3-coder-next | Not supported | 262,144 |
254
- | kimi-k2.5 | 81,920 | 262,144 |
255
- | MiniMax-M2.5 | 32,768 (thinking + response) | 204,800 |
256
- | glm-5 | 32,768 | 202,752 |
257
- | glm-4.7 | 32,768 | 202,752 |
319
+ ```bash
320
+ # Login to GitHub
321
+ cc-helper sync login -r https://github.com/user/repo -t ghp_xxx
258
322
 
259
- ## Features
323
+ # Export
324
+ cc-helper sync export
325
+ cc-helper sync export --file config.json
326
+ cc-helper sync export --workspace test
260
327
 
261
- - Enable `/loop`, `/btw`, `/keybindings` with one command
262
- - Optional `/toolsearch` for third-party API proxies
263
- - Optional `/context1m` for 1M context window (v2.1.76+)
264
- - Enable specific features individually
265
- - Easy restore functionality
266
- - Automatic backup
267
- - Auto-disable npm deprecation warning
268
- - Auto-skip onboarding flow
269
- - Zero runtime dependencies
270
- - Cross-platform support
271
- - Version support: 2.1.71 - 2.1.76+
328
+ # Import
329
+ cc-helper sync import
330
+ ```
272
331
 
273
- ### Examples
332
+ ---
274
333
 
275
- After enabling, use the `/loop` command in Claude Code:
334
+ ## Features
276
335
 
277
- ![/loop command hint](./docs/images/loop-1.png)
336
+ | Feature | Description |
337
+ | ------------------ | ------------------------------------------------------- |
338
+ | One-command enable | Enable `/loop`, `/btw`, `/keybindings` with one command |
339
+ | Tool Search | Optional `/toolsearch` for third-party API proxies |
340
+ | 1M Context | Optional `/context1m` for 1M context (v2.1.76+) |
341
+ | Provider config | `plan` command with vault-based API key storage |
342
+ | Secret management | `vault` command for secure secret storage |
343
+ | Multi-environment | `env` command for environment switching |
344
+ | Git sync | `sync` command for configuration sync |
345
+ | Easy restore | Automatic backup and restore |
346
+ | Zero dependencies | No runtime dependencies |
278
347
 
279
- Example of executing a loop command:
348
+ ### Screenshots
280
349
 
350
+ ![/loop command hint](./docs/images/loop-1.png)
281
351
  ![/loop execution example](./docs/images/loop-2.png)
282
352
 
283
353
  ## Platforms
284
354
 
285
- - macOS (amd64, arm64)
286
- - Linux (amd64, arm64)
287
- - Windows (amd64, arm64)
355
+ | Platform | Architecture |
356
+ | -------- | ------------ |
357
+ | macOS | amd64, arm64 |
358
+ | Linux | amd64, arm64 |
359
+ | Windows | amd64, arm64 |
288
360
 
289
361
  ## License
290
362
 
@@ -294,7 +366,7 @@ AGPL-3.0 - see [LICENSE](./LICENSE)
294
366
 
295
367
  ### Reporting Vulnerabilities
296
368
 
297
- If you discover a security vulnerability in cc-helper, please report it responsibly:
369
+ If you discover a security vulnerability, please report it responsibly:
298
370
 
299
371
  1. **Do not** open a public issue
300
372
  2. Send an email to the maintainer with details
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unitsvc/cc-helper",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "Claude Code /loop feature bypass tool",
5
5
  "main": "dist/index.js",
6
6
  "bin": {