@unitsvc/cc-helper 1.1.2 → 1.2.1

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 +95 -121
  2. package/README.md +95 -121
  3. package/package.json +1 -1
package/README-zh.md CHANGED
@@ -6,16 +6,6 @@
6
6
 
7
7
  > 一键解锁 Claude Code 隐藏超能力:`/loop`、`/btw`、`/keybindings`、`/context1m` 和 `MCPSearch`
8
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
9
  ---
20
10
 
21
11
  ## 环境要求
@@ -107,11 +97,81 @@ npx @unitsvc/cc-helper disable
107
97
 
108
98
  ---
109
99
 
110
- ## 什么是 `/loop`?
100
+ ## 配置命令
111
101
 
112
- 定时重复提示,适用于轮询部署、监控 PR、设置提醒、定时执行工作流。
102
+ ### plan 命令
103
+
104
+ 配置 AI Provider,支持 vault 加密存储。
113
105
 
114
- ### 使用语法
106
+ ```bash
107
+ # 添加 Provider(自动保存到 vault + settings.json)
108
+ cc-helper plan add -p bailian -k YOUR_API_KEY
109
+ cc-helper plan add -p minimaxi -k YOUR_API_KEY --mcp
110
+
111
+ # 切换 Provider
112
+ cc-helper plan switch -p zai
113
+
114
+ # 列出 Provider
115
+ cc-helper plan list
116
+
117
+ # 导出配置
118
+ cc-helper plan export --all-env -o config.json
119
+ ```
120
+
121
+ **支持的 Provider:**
122
+
123
+ | Provider | 说明 |
124
+ | ---------- | ------------ |
125
+ | `bailian` | (CN) Aliyun |
126
+ | `minimaxi` | (CN) MiniMax |
127
+ | `glm` | (CN) Zhipu |
128
+ | `zai` | (EN) Zhipu |
129
+
130
+ ### vault 命令
131
+
132
+ 安全的密钥存储,加密存储在 `cc-helper.json` 中。
133
+
134
+ ```bash
135
+ cc-helper vault list # 列出密钥
136
+ cc-helper vault set bailian default -k "KEY" # 设置
137
+ cc-helper vault get bailian default # 获取并解密
138
+ cc-helper vault delete bailian default # 删除
139
+ ```
140
+
141
+ ### env 命令
142
+
143
+ 多环境配置(default、work、staging 等)。
144
+
145
+ ```bash
146
+ cc-helper env list # 列出环境
147
+ cc-helper env create work # 创建
148
+ cc-helper env switch work # 切换
149
+ ```
150
+
151
+ ### sync 命令
152
+
153
+ 将配置导出/导入到 Git 仓库,支持 JWE 加密。
154
+
155
+ ```bash
156
+ # 登录 GitHub
157
+ cc-helper sync login -r https://github.com/user/repo -t ghp_xxx
158
+
159
+ # 导出
160
+ cc-helper sync export
161
+ cc-helper sync export --file config.json
162
+ cc-helper sync export --workspace test
163
+
164
+ # 导入
165
+ cc-helper sync import
166
+ ```
167
+
168
+ ---
169
+
170
+ ## 核心功能详解
171
+
172
+ ### `/loop` - 定时重复提示
173
+
174
+ 定时重复提示,适用于轮询部署、监控 PR、设置提醒、定时执行工作流。
115
175
 
116
176
  ```
117
177
  /loop [间隔时间] <提示内容>
@@ -125,8 +185,6 @@ npx @unitsvc/cc-helper disable
125
185
  /loop remind me to push the release at 3pm
126
186
  ```
127
187
 
128
- ### 间隔时间格式
129
-
130
188
  | 形式 | 示例 | 解析间隔 |
131
189
  | ---------- | --------------------------- | ------------ |
132
190
  | 前置时间 | `/loop 30m check` | 每 30 分钟 |
@@ -135,26 +193,22 @@ npx @unitsvc/cc-helper disable
135
193
 
136
194
  支持单位:`s`(秒)、`m`(分)、`h`(时)、`d`(天)
137
195
 
138
- ### 核心特性
196
+ **核心特性:**
139
197
 
140
198
  - **会话级别**:任务仅在当前会话中存在,退出即消失
141
199
  - **自动过期**:3 天后自动过期
142
200
  - **抖动保护**:小偏移量防止 API 惊群效应
143
201
  - **低优先级**:在你与 Claude 交互间隙触发
144
202
 
145
- ### 管理任务
146
-
147
203
  ```
148
204
  what scheduled tasks do I have? # 列出所有任务
149
205
  cancel the deploy check job # 按描述或 ID 取消
150
206
  ```
151
207
 
152
- ## 什么是 `/btw`?
208
+ ### `/btw` - 旁支问题
153
209
 
154
210
  在不打断主对话的情况下提问旁支问题。
155
211
 
156
- ### 使用方法
157
-
158
212
  ```
159
213
  /btw <问题>
160
214
  ```
@@ -167,9 +221,9 @@ cancel the deploy check job # 按描述或 ID 取消
167
221
  /btw 为什么这里要用 async/await?
168
222
  ```
169
223
 
170
- ## 什么是 `/keybindings`?
224
+ ### `/keybindings` - 自定义键盘快捷键
171
225
 
172
- 自定义键盘快捷键。在 `~/.claude/keybindings.json` 中配置:
226
+ `~/.claude/keybindings.json` 中配置:
173
227
 
174
228
  ```json
175
229
  {
@@ -181,60 +235,48 @@ cancel the deploy check job # 按描述或 ID 取消
181
235
  }
182
236
  ```
183
237
 
184
- ## 什么是 `/context1m`?
238
+ ### `/context1m` - 1M 上下文
185
239
 
186
240
  为 Claude Opus 模型启用 1M token 上下文窗口。
187
241
 
188
- ### 要求
242
+ **要求:**
189
243
 
190
244
  - Claude Code v2.1.76 或更高版本
191
245
  - Claude Opus 4+ 模型
192
246
  - 可能需要 Pro 计划或官方 API
193
247
 
194
- ### 使用方法
195
-
196
- ```bash
197
- npx @unitsvc/cc-helper enable context1m # 别名: 1m, 1M
198
- ```
199
-
200
248
  ![/context1m 启用](./docs/images/1m-1.png)
201
249
 
202
- ### 扩展思维与上下文长度
250
+ **扩展思维与上下文长度:**
203
251
 
204
252
  | 模型 | 最大思维链长度 | 上下文长度 |
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
-
217
- ## 什么是工具搜索?
253
+ | -------------------- | -------------: | ---------: |
254
+ | qwen3.5-plus | 81,920 | 1,000,000 |
255
+ | qwen3-coder-plus | 不支持 | 1,000,000 |
256
+ | qwen3-max-2026-01-23 | 81,920 | 262,144 |
257
+ | qwen3-coder-next | 不支持 | 262,144 |
258
+ | kimi-k2.5 | 81,920 | 262,144 |
259
+ | MiniMax-M2.5 | 32,768 | 204,800 |
260
+ | glm-5 | 32,768 | 202,752 |
261
+ | glm-4.7 | 32,768 | 202,752 |
262
+
263
+ ### 工具搜索
218
264
 
219
265
  在运行时动态搜索和加载工具,而非一次性发送所有工具定义。节省 token 并提高性能。
220
266
 
221
- ### 为什么为第三方 API 启用?
222
-
223
- Claude Code 在使用第三方 API 代理时默认禁用工具搜索。此功能为这些代理启用工具搜索。
267
+ **为什么为第三方 API 启用?** Claude Code 在使用第三方 API 代理时默认禁用工具搜索。此功能为这些代理启用工具搜索。
224
268
 
225
- ### 优势
269
+ **优势:**
226
270
 
227
271
  - **Token 效率**:减少大型 MCP 工具目录的上下文占用
228
272
  - **性能提升**:延迟加载,响应更快
229
273
  - **代理兼容**:支持 Kimi 和其他提供商
230
274
 
231
- ### 要求
275
+ **要求:**
232
276
 
233
277
  - 代理必须支持 API 响应中的 `tool_reference` 块
234
278
  - 仅支持 Claude Sonnet 4+ 和 Opus 4+ 模型(不支持 Haiku)
235
279
 
236
- ### 配置说明
237
-
238
280
  通过 `ENABLE_TOOL_SEARCH` 环境变量控制:
239
281
 
240
282
  | 值 | 行为 |
@@ -251,7 +293,7 @@ ENABLE_TOOL_SEARCH=false claude # 禁用
251
293
  ENABLE_TOOL_SEARCH=true claude # 始终启用
252
294
  ```
253
295
 
254
- #### 禁用 MCPSearch 工具
296
+ 禁用 MCPSearch 工具:
255
297
 
256
298
  ```json
257
299
  {
@@ -263,74 +305,6 @@ ENABLE_TOOL_SEARCH=true claude # 始终启用
263
305
 
264
306
  ---
265
307
 
266
- ## plan 命令
267
-
268
- 配置 AI Provider,支持 vault 加密存储。
269
-
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
274
-
275
- # 切换 Provider
276
- cc-helper plan switch -p zai
277
-
278
- # 列出 Provider
279
- cc-helper plan list
280
-
281
- # 导出配置
282
- cc-helper plan export --all-env -o config.json
283
- ```
284
-
285
- **支持的 Provider:**
286
-
287
- | Provider | 说明 |
288
- | ---------- | ------------ |
289
- | `bailian` | (CN) Aliyun |
290
- | `minimaxi` | (CN) MiniMax |
291
- | `glm` | (CN) Zhipu |
292
- | `zai` | (EN) Zhipu |
293
-
294
- ## vault 命令
295
-
296
- 安全的密钥存储,加密存储在 `cc-helper.json` 中。
297
-
298
- ```bash
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
- ```
304
-
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 # 切换
313
- ```
314
-
315
- ## sync 命令
316
-
317
- 将配置导出/导入到 Git 仓库,支持 JWE 加密。
318
-
319
- ```bash
320
- # 登录 GitHub
321
- cc-helper sync login -r https://github.com/user/repo -t ghp_xxx
322
-
323
- # 导出
324
- cc-helper sync export
325
- cc-helper sync export --file config.json
326
- cc-helper sync export --workspace test
327
-
328
- # 导入
329
- cc-helper sync import
330
- ```
331
-
332
- ---
333
-
334
308
  ## 功能特点
335
309
 
336
310
  | 功能 | 说明 |
package/README.md CHANGED
@@ -6,16 +6,6 @@
6
6
 
7
7
  > One command to unlock Claude Code's hidden superpowers: `/loop`, `/btw`, `/keybindings`, `/context1m`, and `MCPSearch`
8
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
9
  ---
20
10
 
21
11
  ## Requirements
@@ -107,11 +97,81 @@ npx @unitsvc/cc-helper disable
107
97
 
108
98
  ---
109
99
 
110
- ## What is `/loop`?
100
+ ## Configuration Commands
101
+
102
+ ### plan Command
103
+
104
+ Configure AI providers with vault-based secret storage.
105
+
106
+ ```bash
107
+ # Add provider (auto-saves to vault + settings.json)
108
+ cc-helper plan add -p bailian -k YOUR_API_KEY
109
+ cc-helper plan add -p minimaxi -k YOUR_API_KEY --mcp
110
+
111
+ # Switch provider
112
+ cc-helper plan switch -p zai
113
+
114
+ # List providers
115
+ cc-helper plan list
116
+
117
+ # Export config
118
+ cc-helper plan export --all-env -o config.json
119
+ ```
120
+
121
+ **Supported Providers:**
122
+
123
+ | Provider | Description |
124
+ | ---------- | ------------ |
125
+ | `bailian` | (CN) Aliyun |
126
+ | `minimaxi` | (CN) MiniMax |
127
+ | `glm` | (CN) Zhipu |
128
+ | `zai` | (EN) Zhipu |
129
+
130
+ ### vault Command
131
+
132
+ Secure API key storage, encrypted in `cc-helper.json`.
133
+
134
+ ```bash
135
+ cc-helper vault list # List secrets
136
+ cc-helper vault set bailian default -k "KEY" # Set
137
+ cc-helper vault get bailian default # Get & decrypt
138
+ cc-helper vault delete bailian default # Delete
139
+ ```
140
+
141
+ ### env Command
142
+
143
+ Multiple environments (default, work, staging, etc.).
144
+
145
+ ```bash
146
+ cc-helper env list # List environments
147
+ cc-helper env create work # Create
148
+ cc-helper env switch work # Switch
149
+ ```
150
+
151
+ ### sync Command
152
+
153
+ Export/import config to Git repository with JWE encryption.
154
+
155
+ ```bash
156
+ # Login to GitHub
157
+ cc-helper sync login -r https://github.com/user/repo -t ghp_xxx
158
+
159
+ # Export
160
+ cc-helper sync export
161
+ cc-helper sync export --file config.json
162
+ cc-helper sync export --workspace test
163
+
164
+ # Import
165
+ cc-helper sync import
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Core Features
111
171
 
112
- Schedule recurring prompts for polling deployments, babysitting PRs, setting reminders, or running workflows on an interval.
172
+ ### `/loop` - Scheduled Recurring Prompts
113
173
 
114
- ### Usage Syntax
174
+ Schedule prompts for polling deployments, babysitting PRs, setting reminders, or running workflows on an interval.
115
175
 
116
176
  ```
117
177
  /loop [interval] <prompt>
@@ -125,8 +185,6 @@ Schedule recurring prompts for polling deployments, babysitting PRs, setting rem
125
185
  /loop remind me to push the release at 3pm
126
186
  ```
127
187
 
128
- ### Interval Formats
129
-
130
188
  | Form | Example | Parsed Interval |
131
189
  | ---------------- | --------------------------- | ---------------------- |
132
190
  | Leading token | `/loop 30m check` | every 30 minutes |
@@ -135,26 +193,22 @@ Schedule recurring prompts for polling deployments, babysitting PRs, setting rem
135
193
 
136
194
  Supported units: `s` (seconds), `m` (minutes), `h` (hours), `d` (days)
137
195
 
138
- ### Key Features
196
+ **Key Features:**
139
197
 
140
198
  - **Session-scoped**: Tasks live in the current session and disappear on exit
141
199
  - **Auto-expiry**: Tasks expire after 3 days
142
200
  - **Jitter protection**: Small offsets prevent API thundering herd
143
201
  - **Low priority**: Fires between your turns, not while Claude is busy
144
202
 
145
- ### Managing Tasks
146
-
147
203
  ```
148
204
  what scheduled tasks do I have? # List all tasks
149
205
  cancel the deploy check job # Cancel by description or ID
150
206
  ```
151
207
 
152
- ## What is `/btw`?
208
+ ### `/btw` - Side Questions
153
209
 
154
210
  Ask side questions without disrupting the main conversation flow.
155
211
 
156
- ### Usage
157
-
158
212
  ```
159
213
  /btw <question>
160
214
  ```
@@ -167,9 +221,9 @@ Ask side questions without disrupting the main conversation flow.
167
221
  /btw why use async/await in this case?
168
222
  ```
169
223
 
170
- ## What is `/keybindings`?
224
+ ### `/keybindings` - Custom Keyboard Shortcuts
171
225
 
172
- Custom keyboard shortcuts. Configure in `~/.claude/keybindings.json`:
226
+ Configure in `~/.claude/keybindings.json`:
173
227
 
174
228
  ```json
175
229
  {
@@ -181,60 +235,48 @@ Custom keyboard shortcuts. Configure in `~/.claude/keybindings.json`:
181
235
  }
182
236
  ```
183
237
 
184
- ## What is `/context1m`?
238
+ ### `/context1m` - 1M Token Context
185
239
 
186
240
  Enable 1M token context window for Claude Opus models.
187
241
 
188
- ### Requirements
242
+ **Requirements:**
189
243
 
190
244
  - Claude Code v2.1.76 or higher
191
245
  - Claude Opus 4+ model
192
246
  - May require Pro plan or first-party API
193
247
 
194
- ### Usage
195
-
196
- ```bash
197
- npx @unitsvc/cc-helper enable context1m # or: 1m, 1M
198
- ```
199
-
200
248
  ![/context1m enable](./docs/images/1m-1.png)
201
249
 
202
- ### Extended Thinking & Context Length
250
+ **Extended Thinking & Context Length:**
203
251
 
204
252
  | 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 |
214
-
215
- ---
216
-
217
- ## What is Tool Search?
253
+ | -------------------- | ------------------: | -------------: |
254
+ | qwen3.5-plus | 81,920 | 1,000,000 |
255
+ | qwen3-coder-plus | Not supported | 1,000,000 |
256
+ | qwen3-max-2026-01-23 | 81,920 | 262,144 |
257
+ | qwen3-coder-next | Not supported | 262,144 |
258
+ | kimi-k2.5 | 81,920 | 262,144 |
259
+ | MiniMax-M2.5 | 32,768 | 204,800 |
260
+ | glm-5 | 32,768 | 202,752 |
261
+ | glm-4.7 | 32,768 | 202,752 |
262
+
263
+ ### Tool Search
218
264
 
219
265
  Dynamically search and load tools at runtime instead of sending all tool definitions upfront. Saves tokens and improves performance.
220
266
 
221
- ### Why Third-Party APIs?
267
+ **Why Third-Party APIs?** Claude Code disables Tool Search for third-party proxies by default. This feature enables it.
222
268
 
223
- Claude Code disables Tool Search for third-party proxies by default. This feature enables it.
224
-
225
- ### Benefits
269
+ **Benefits:**
226
270
 
227
271
  - **Token efficiency**: Reduces context usage for large MCP tool catalogs
228
272
  - **Better performance**: Faster response with deferred loading
229
273
  - **Proxy compatibility**: Works with Kimi and other providers
230
274
 
231
- ### Requirements
275
+ **Requirements:**
232
276
 
233
277
  - Proxy must support `tool_reference` blocks
234
278
  - Claude Sonnet 4+ or Opus 4+ models only (not Haiku)
235
279
 
236
- ### Configuration
237
-
238
280
  Control via `ENABLE_TOOL_SEARCH` environment variable:
239
281
 
240
282
  | Value | Behavior |
@@ -251,7 +293,7 @@ ENABLE_TOOL_SEARCH=false claude # Disable
251
293
  ENABLE_TOOL_SEARCH=true claude # Always enable
252
294
  ```
253
295
 
254
- #### Disable MCPSearch Tool
296
+ Disable MCPSearch Tool:
255
297
 
256
298
  ```json
257
299
  {
@@ -263,74 +305,6 @@ ENABLE_TOOL_SEARCH=true claude # Always enable
263
305
 
264
306
  ---
265
307
 
266
- ## plan Command
267
-
268
- Configure AI providers with vault-based secret storage.
269
-
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
274
-
275
- # Switch provider
276
- cc-helper plan switch -p zai
277
-
278
- # List providers
279
- cc-helper plan list
280
-
281
- # Export config
282
- cc-helper plan export --all-env -o config.json
283
- ```
284
-
285
- **Supported Providers:**
286
-
287
- | Provider | Description |
288
- | ---------- | ------------ |
289
- | `bailian` | (CN) Aliyun |
290
- | `minimaxi` | (CN) MiniMax |
291
- | `glm` | (CN) Zhipu |
292
- | `zai` | (EN) Zhipu |
293
-
294
- ## vault Command
295
-
296
- Secure API key storage, encrypted in `cc-helper.json`.
297
-
298
- ```bash
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
306
-
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
313
- ```
314
-
315
- ## sync Command
316
-
317
- Export/import config to Git repository with JWE encryption.
318
-
319
- ```bash
320
- # Login to GitHub
321
- cc-helper sync login -r https://github.com/user/repo -t ghp_xxx
322
-
323
- # Export
324
- cc-helper sync export
325
- cc-helper sync export --file config.json
326
- cc-helper sync export --workspace test
327
-
328
- # Import
329
- cc-helper sync import
330
- ```
331
-
332
- ---
333
-
334
308
  ## Features
335
309
 
336
310
  | Feature | Description |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unitsvc/cc-helper",
3
- "version": "1.1.2",
3
+ "version": "1.2.1",
4
4
  "description": "Claude Code /loop feature bypass tool",
5
5
  "main": "dist/index.js",
6
6
  "bin": {