@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.
- package/README-zh.md +219 -135
- package/README.md +223 -151
- package/package.json +1 -1
package/README-zh.md
CHANGED
|
@@ -1,22 +1,58 @@
|
|
|
1
1
|
# cc-helper
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@unitsvc/cc-helper)
|
|
4
|
-
[](https://github.com/next-bin/cc-helper/blob/master/LICENSE)
|
|
5
|
-
[](https://nodejs.org)
|
|
3
|
+
[](https://www.npmjs.com/package/@unitsvc/cc-helper) [](https://github.com/next-bin/cc-helper/blob/master/LICENSE) [](https://nodejs.org) [](https://docs.anthropic.com/en/docs/claude-code)
|
|
6
4
|
|
|
7
|
-
[**English**](./README.md) | **简体中文**
|
|
5
|
+
[**English**](./README.md) | [**简体中文**](./README-zh.md)
|
|
8
6
|
|
|
9
|
-
>
|
|
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
|
-
|
|
14
|
-
|
|
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
|
|
45
|
-
| `enable loop` | 仅启用 `/loop`
|
|
46
|
-
| `enable btw` | 仅启用 `/btw`
|
|
47
|
-
| `enable keybindings` | 仅启用 `/keybindings`
|
|
48
|
-
| `enable toolsearch` | 启用 toolsearch
|
|
49
|
-
| `enable context1m` | 启用 1M
|
|
50
|
-
| `disable` | 恢复原始状态
|
|
51
|
-
| `status` | 查看当前状态及版本要求
|
|
52
|
-
|
|
53
|
-
**注意**: 运行 `cc-helper enable` 时会自动在 `~/.claude/settings.json` 中配置推荐的环境变量:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
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` |
|
|
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
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
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
|
-
|
|
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
|
+

|
|
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
|
-
|
|
219
|
+
在运行时动态搜索和加载工具,而非一次性发送所有工具定义。节省 token 并提高性能。
|
|
136
220
|
|
|
137
221
|
### 为什么为第三方 API 启用?
|
|
138
222
|
|
|
139
|
-
|
|
223
|
+
Claude Code 在使用第三方 API 代理时默认禁用工具搜索。此功能为这些代理启用工具搜索。
|
|
140
224
|
|
|
141
225
|
### 优势
|
|
142
226
|
|
|
143
|
-
- **Token 效率**:减少大型 MCP
|
|
144
|
-
-
|
|
145
|
-
- **代理兼容**:支持 Kimi
|
|
227
|
+
- **Token 效率**:减少大型 MCP 工具目录的上下文占用
|
|
228
|
+
- **性能提升**:延迟加载,响应更快
|
|
229
|
+
- **代理兼容**:支持 Kimi 和其他提供商
|
|
146
230
|
|
|
147
231
|
### 要求
|
|
148
232
|
|
|
149
|
-
-
|
|
233
|
+
- 代理必须支持 API 响应中的 `tool_reference` 块
|
|
150
234
|
- 仅支持 Claude Sonnet 4+ 和 Opus 4+ 模型(不支持 Haiku)
|
|
151
235
|
|
|
152
236
|
### 配置说明
|
|
153
237
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
通过 `ENABLE_TOOL_SEARCH` 环境变量控制工具搜索行为:
|
|
238
|
+
通过 `ENABLE_TOOL_SEARCH` 环境变量控制:
|
|
157
239
|
|
|
158
|
-
| 值 | 行为
|
|
159
|
-
| ---------- |
|
|
160
|
-
| (未设置) |
|
|
161
|
-
| `true` |
|
|
162
|
-
| `auto` |
|
|
163
|
-
| `auto:<N>` |
|
|
164
|
-
| `false` |
|
|
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
|
-
#
|
|
170
|
-
ENABLE_TOOL_SEARCH=
|
|
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
|
-
|
|
264
|
+
---
|
|
194
265
|
|
|
195
|
-
|
|
266
|
+
## plan 命令
|
|
196
267
|
|
|
197
|
-
|
|
268
|
+
配置 AI Provider,支持 vault 加密存储。
|
|
198
269
|
|
|
199
|
-
|
|
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
|
-
|
|
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
|
-
|
|
278
|
+
# 列出 Provider
|
|
279
|
+
cc-helper plan list
|
|
212
280
|
|
|
213
|
-
|
|
281
|
+
# 导出配置
|
|
282
|
+
cc-helper plan export --all-env -o config.json
|
|
283
|
+
```
|
|
214
284
|
|
|
215
|
-
|
|
285
|
+
**支持的 Provider:**
|
|
216
286
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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
|
-
|
|
225
|
-
|
|
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
|
-
|
|
229
|
-
|
|
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
|
-
|
|
317
|
+
将配置导出/导入到 Git 仓库,支持 JWE 加密。
|
|
235
318
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
250
|
-
-
|
|
251
|
-
|
|
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
|
-
|
|
334
|
+
## 功能特点
|
|
264
335
|
|
|
265
|
-
|
|
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
|
-
|
|
348
|
+
### 截图
|
|
268
349
|
|
|
350
|
+

|
|
269
351
|

|
|
270
352
|
|
|
271
353
|
## 支持平台
|
|
272
354
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
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
|
-
[](https://www.npmjs.com/package/@unitsvc/cc-helper)
|
|
4
|
-
[](https://github.com/next-bin/cc-helper/blob/master/LICENSE)
|
|
5
|
-
[](https://nodejs.org)
|
|
3
|
+
[](https://www.npmjs.com/package/@unitsvc/cc-helper) [](https://github.com/next-bin/cc-helper/blob/master/LICENSE) [](https://nodejs.org) [](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
|
-
>
|
|
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
|
-
|
|
14
|
-
|
|
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
|
|
72
|
+
# Disable all features
|
|
37
73
|
npx @unitsvc/cc-helper disable
|
|
38
74
|
```
|
|
39
75
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
| Command | Description
|
|
43
|
-
| -------------------- |
|
|
44
|
-
| `enable` | Enable `/loop`, `/btw`, and `/keybindings`
|
|
45
|
-
| `enable loop` | Enable only `/loop`
|
|
46
|
-
| `enable btw` | Enable only `/btw`
|
|
47
|
-
| `enable keybindings` | Enable only `/keybindings`
|
|
48
|
-
| `enable toolsearch` | Enable toolsearch
|
|
49
|
-
| `enable context1m` | Enable 1M context
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
```
|
|
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
|
-
|
|
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
|
|
106
|
-
|
|
|
107
|
-
| Leading token
|
|
108
|
-
| Trailing `every`
|
|
109
|
-
| No interval
|
|
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
|
|
116
|
-
- **Auto-expiry**:
|
|
117
|
-
- **Jitter protection**:
|
|
118
|
-
- **Low priority**:
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
172
|
+
Custom keyboard shortcuts. Configure in `~/.claude/keybindings.json`:
|
|
150
173
|
|
|
151
|
-
|
|
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
|
-
|
|
184
|
+
## What is `/context1m`?
|
|
154
185
|
|
|
155
|
-
|
|
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
|
-
-
|
|
162
|
-
-
|
|
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
|
-
###
|
|
194
|
+
### Usage
|
|
165
195
|
|
|
166
|
-
|
|
196
|
+
```bash
|
|
197
|
+
npx @unitsvc/cc-helper enable context1m # or: 1m, 1M
|
|
198
|
+
```
|
|
167
199
|
|
|
168
|
-
|
|
200
|
+

|
|
169
201
|
|
|
170
|
-
|
|
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
|
-
|
|
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
|
-
|
|
181
|
-
# Use custom 5% threshold
|
|
182
|
-
ENABLE_TOOL_SEARCH=auto:5 claude
|
|
215
|
+
---
|
|
183
216
|
|
|
184
|
-
|
|
185
|
-
ENABLE_TOOL_SEARCH=false claude
|
|
217
|
+
## What is Tool Search?
|
|
186
218
|
|
|
187
|
-
|
|
188
|
-
|
|
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
|
-
|
|
238
|
+
Control via `ENABLE_TOOL_SEARCH` environment variable:
|
|
192
239
|
|
|
193
|
-
|
|
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
|
-
|
|
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
|
-
|
|
264
|
+
---
|
|
206
265
|
|
|
207
|
-
|
|
266
|
+
## plan Command
|
|
208
267
|
|
|
209
|
-
|
|
268
|
+
Configure AI providers with vault-based secret storage.
|
|
210
269
|
|
|
211
|
-
|
|
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
|
-
|
|
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
|
-
|
|
278
|
+
# List providers
|
|
279
|
+
cc-helper plan list
|
|
224
280
|
|
|
225
|
-
|
|
281
|
+
# Export config
|
|
282
|
+
cc-helper plan export --all-env -o config.json
|
|
283
|
+
```
|
|
226
284
|
|
|
227
|
-
|
|
285
|
+
**Supported Providers:**
|
|
228
286
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
287
|
+
| Provider | Description |
|
|
288
|
+
| ---------- | ------------ |
|
|
289
|
+
| `bailian` | (CN) Aliyun |
|
|
290
|
+
| `minimaxi` | (CN) MiniMax |
|
|
291
|
+
| `glm` | (CN) Zhipu |
|
|
292
|
+
| `zai` | (EN) Zhipu |
|
|
232
293
|
|
|
233
|
-
|
|
294
|
+
## vault Command
|
|
295
|
+
|
|
296
|
+
Secure API key storage, encrypted in `cc-helper.json`.
|
|
234
297
|
|
|
235
298
|
```bash
|
|
236
|
-
#
|
|
237
|
-
|
|
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
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
-
|
|
315
|
+
## sync Command
|
|
245
316
|
|
|
246
|
-
|
|
317
|
+
Export/import config to Git repository with JWE encryption.
|
|
247
318
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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
|
-
|
|
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
|
-
|
|
262
|
-
-
|
|
263
|
-
|
|
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
|
-
|
|
332
|
+
---
|
|
274
333
|
|
|
275
|
-
|
|
334
|
+
## Features
|
|
276
335
|
|
|
277
|
-
|
|
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
|
-
|
|
348
|
+
### Screenshots
|
|
280
349
|
|
|
350
|
+

|
|
281
351
|

|
|
282
352
|
|
|
283
353
|
## Platforms
|
|
284
354
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
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
|
|
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
|