@unitsvc/cc-helper 1.3.8 → 1.4.2

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 (5) hide show
  1. package/LICENSE +661 -661
  2. package/README-zh.md +469 -471
  3. package/README.md +469 -471
  4. package/dist/cli.js +0 -0
  5. package/package.json +48 -48
package/README.md CHANGED
@@ -1,471 +1,469 @@
1
- # cc-helper
2
-
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)
4
-
5
- [**English**](./README.md) | [**简体中文**](./README-zh.md)
6
-
7
- > One command to unlock Claude Code's hidden superpowers: `/loop`, `/btw`, `/keybindings`, `/context1m`, `automode`, `monitor`, and `MCPSearch`
8
-
9
- ---
10
-
11
- ## Requirements
12
-
13
- | Item | Version |
14
- | ----------- | --------- |
15
- | Node.js | >= 14.0.0 |
16
- | Claude Code | v2.1.71+ |
17
-
18
- ```bash
19
- npm install -g @anthropic-ai/claude-code@v2.1.101
20
- ```
21
-
22
- ## Installation
23
-
24
- Two ways to use (choose one):
25
-
26
- ```bash
27
- # Install globally (optional)
28
- npm install -g @unitsvc/cc-helper@latest
29
-
30
- # Or run directly without installation
31
- npx @unitsvc/cc-helper@latest enable
32
- ```
33
-
34
- ### Proxy Support
35
-
36
- If download fails, use `--proxy` flag:
37
-
38
- ```bash
39
- # Use default proxy
40
- npx @unitsvc/cc-helper --proxy enable
41
-
42
- # Use custom proxy
43
- npx @unitsvc/cc-helper --proxy https://your-proxy.com enable
44
- ```
45
-
46
- ## Usage
47
-
48
- ```bash
49
- # Enable default features (/loop, /btw, /keybindings)
50
- npx @unitsvc/cc-helper enable
51
-
52
- # Enable specific features
53
- npx @unitsvc/cc-helper enable loop
54
- npx @unitsvc/cc-helper enable btw
55
- npx @unitsvc/cc-helper enable keybindings
56
- npx @unitsvc/cc-helper enable toolsearch
57
- npx @unitsvc/cc-helper enable context1m # or: 1m, 1M
58
- npx @unitsvc/cc-helper enable automode # auto-mode for all models
59
- npx @unitsvc/cc-helper enable monitor # streaming event monitoring (v2.1.100+)
60
-
61
- # Check status
62
- npx @unitsvc/cc-helper status
63
-
64
- # Disable all features
65
- npx @unitsvc/cc-helper disable
66
- ```
67
-
68
- ## Commands
69
-
70
- | Command | Description |
71
- | -------------------- | ---------------------------------------------------- |
72
- | `enable` | Enable `/loop`, `/btw`, and `/keybindings` (default) |
73
- | `enable loop` | Enable only `/loop` |
74
- | `enable btw` | Enable only `/btw` |
75
- | `enable keybindings` | Enable only `/keybindings` |
76
- | `enable toolsearch` | Enable toolsearch (requires explicit activation) |
77
- | `enable context1m` | Enable 1M context for Claude Opus (v2.1.76+) |
78
- | `enable automode` | Enable auto-mode for all models (v2.1.75+) |
79
- | `enable monitor` | Enable Monitor tool for streaming events (v2.1.100+) |
80
- | `disable` | Restore original |
81
- | `status` | Check current status with version requirements |
82
-
83
- > **Note**: Running `cc-helper enable` also automatically configures recommended environment variables in `~/.claude/settings.json`:
84
- >
85
- > ```json
86
- > {
87
- > "env": {
88
- > "DISABLE_INSTALLATION_CHECKS": "1",
89
- > "DISABLE_AUTOUPDATER": "1",
90
- > "DISABLE_BUG_COMMAND": "1",
91
- > "DISABLE_ERROR_REPORTING": "1",
92
- > "DISABLE_TELEMETRY": "1",
93
- > "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
94
- > "CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY": "1",
95
- > "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
96
- > "CLAUDE_CODE_HIDE_ACCOUNT_INFO": "1",
97
- > "CLAUDE_CODE_NEW_INIT": "1",
98
- > "CLAUDE_CODE_ATTRIBUTION_HEADER": "0",
99
- > "API_TIMEOUT_MS": "3000000"
100
- > }
101
- > }
102
- > ```
103
-
104
- ---
105
-
106
- ## Configuration Commands
107
-
108
- ### plan Command
109
-
110
- Configure AI providers with vault-based secret storage.
111
-
112
- ```bash
113
- # Add provider (auto-saves to vault + settings.json)
114
- cc-helper plan add -p bailian -k YOUR_API_KEY
115
- cc-helper plan add -p minimaxi -k YOUR_API_KEY --mcp
116
-
117
- # Switch provider
118
- cc-helper plan switch -p zai
119
-
120
- # Switch model profile (on current provider)
121
- cc-helper plan switch --profile 1m
122
-
123
- # Switch provider with profile
124
- cc-helper plan switch -p bailian -k YOUR_KEY --profile 1m
125
-
126
- # List providers
127
- cc-helper plan list
128
-
129
- # Export config
130
- cc-helper plan export --all-env -o config.json
131
- ```
132
-
133
- **Supported Providers:**
134
-
135
- | Provider | Description |
136
- | ---------- | ------------ |
137
- | `bailian` | (CN) Aliyun |
138
- | `minimaxi` | (CN) MiniMax |
139
- | `glm` | (CN) Zhipu |
140
- | `zai` | (EN) Zhipu |
141
-
142
- **Model Profiles:**
143
-
144
- Each provider supports multiple model profiles. A profile defines mappings for all model tiers:
145
-
146
- | Field | Description |
147
- | --------- | ------------------------------------------------- |
148
- | Model | Default model (`ANTHROPIC_MODEL`) |
149
- | Haiku | Fast model (`ANTHROPIC_DEFAULT_HAIKU_MODEL`) |
150
- | Sonnet | Balanced model (`ANTHROPIC_DEFAULT_SONNET_MODEL`) |
151
- | Opus | Powerful model (`ANTHROPIC_DEFAULT_OPUS_MODEL`) |
152
- | Reasoning | Extended thinking (`ANTHROPIC_REASONING_MODEL`) |
153
-
154
- **bailian Profiles:**
155
-
156
- | Profile | Model | Haiku | Sonnet | Opus | Reasoning |
157
- | ------- | ------------ | ------------ | ------------ | ------------ | ------------ |
158
- | default | glm-5 | glm-4.7 | glm-5 | glm-5 | glm-5 |
159
- | 5 | glm-5 | glm-5 | glm-5 | qwen3.6-plus | glm-5 |
160
- | 1m | glm-5 | glm-4.7 | qwen3.5-plus | qwen3.5-plus | glm-5 |
161
- | 3.6 | qwen3.6-plus | qwen3.6-plus | qwen3.6-plus | qwen3.6-plus | qwen3.6-plus |
162
- | kimi | kimi-k2.5 | kimi-k2.5 | kimi-k2.5 | kimi-k2.5 | kimi-k2.5 |
163
- | minimax | MiniMax-M2.5 | MiniMax-M2.5 | MiniMax-M2.5 | MiniMax-M2.5 | MiniMax-M2.5 |
164
-
165
- **glm / zai Profiles:**
166
-
167
- | Profile | Model | Haiku | Sonnet | Opus | Reasoning |
168
- | ------- | ------------ | ----------- | ------- | ------------ | ------------ |
169
- | default | glm-5 | glm-4.7 | glm-5 | glm-5 | glm-5 |
170
- | 5 | glm-5 | glm-5-turbo | glm-5 | glm-5 | glm-5 |
171
- | 5.1 | glm-5.1 | glm-4.7 | glm-4.7 | glm-5 | glm-5.1 |
172
- | 5v | glm-5v-turbo | glm-5-turbo | glm-5.1 | glm-5v-turbo | glm-5v-turbo |
173
-
174
- **minimaxi Profiles:**
175
-
176
- | Profile | Model | Haiku | Sonnet | Opus | Reasoning |
177
- | ------- | ------------ | ------------ | ------------ | ------------ | ------------ |
178
- | default | MiniMax-M2.7 | MiniMax-M2.5 | MiniMax-M2.7 | MiniMax-M2.7 | MiniMax-M2.7 |
179
-
180
- ```bash
181
- # Example: Use 1M context on bailian
182
- cc-helper plan add -p bailian -k YOUR_KEY
183
- cc-helper plan switch --profile 1m
184
- ```
185
-
186
- ### vault Command
187
-
188
- Secure API key storage, encrypted in `cc-helper.json`.
189
-
190
- ```bash
191
- cc-helper vault list # List secrets
192
- cc-helper vault set bailian default -k "KEY" # Set
193
- cc-helper vault get bailian default # Get & decrypt
194
- cc-helper vault delete bailian default # Delete
195
- ```
196
-
197
- ### env Command
198
-
199
- Multiple environments (default, work, staging, etc.).
200
-
201
- ```bash
202
- cc-helper env list # List environments
203
- cc-helper env create work # Create
204
- cc-helper env switch work # Switch
205
- ```
206
-
207
- ### sync Command
208
-
209
- Export/import config to Git repository with JWE encryption.
210
-
211
- ```bash
212
- # Login to GitHub
213
- cc-helper sync login -r https://github.com/user/repo -t ghp_xxx
214
-
215
- # Export
216
- cc-helper sync export
217
- cc-helper sync export --file config.json
218
- cc-helper sync export --workspace test
219
-
220
- # Import
221
- cc-helper sync import
222
- ```
223
-
224
- ---
225
-
226
- ## Core Features
227
-
228
- ### `/loop` - Scheduled Recurring Prompts
229
-
230
- Schedule prompts for polling deployments, babysitting PRs, setting reminders, or running workflows on an interval.
231
-
232
- ```
233
- /loop [interval] <prompt>
234
- ```
235
-
236
- **Examples:**
237
-
238
- ```
239
- /loop 5m check if the deployment finished
240
- /loop 30m /review-pr 1234
241
- /loop remind me to push the release at 3pm
242
- ```
243
-
244
- | Form | Example | Parsed Interval |
245
- | ---------------- | --------------------------- | ---------------------- |
246
- | Leading token | `/loop 30m check` | every 30 minutes |
247
- | Trailing `every` | `/loop check every 2 hours` | every 2 hours |
248
- | No interval | `/loop check` | defaults to 10 minutes |
249
-
250
- Supported units: `s` (seconds), `m` (minutes), `h` (hours), `d` (days)
251
-
252
- **Key Features:**
253
-
254
- - **Session-scoped**: Tasks live in the current session and disappear on exit
255
- - **Auto-expiry**: Tasks expire after 3 days
256
- - **Jitter protection**: Small offsets prevent API thundering herd
257
- - **Low priority**: Fires between your turns, not while Claude is busy
258
-
259
- ```
260
- what scheduled tasks do I have? # List all tasks
261
- cancel the deploy check job # Cancel by description or ID
262
- ```
263
-
264
- ### `/btw` - Side Questions
265
-
266
- Ask side questions without disrupting the main conversation flow.
267
-
268
- ```
269
- /btw <question>
270
- ```
271
-
272
- **Examples:**
273
-
274
- ```
275
- /btw what does this function do?
276
- /btw explain the error handling here
277
- /btw why use async/await in this case?
278
- ```
279
-
280
- ### `/keybindings` - Custom Keyboard Shortcuts
281
-
282
- Configure in `~/.claude/keybindings.json`:
283
-
284
- ```json
285
- {
286
- "submit": ["ctrl+s"],
287
- "interrupt": ["ctrl+c"],
288
- "custom_commands": {
289
- "ctrl+shift+l": "/loop 5m check status"
290
- }
291
- }
292
- ```
293
-
294
- ### `/context1m` - 1M Token Context
295
-
296
- Enable 1M token context window for Claude Opus models.
297
-
298
- **Requirements:**
299
-
300
- - Claude Code v2.1.76 or higher
301
- - Claude Opus 4+ model
302
- - May require Pro plan or first-party API
303
-
304
- ![/context1m enable](./docs/images/1m-1.png)
305
-
306
- **Extended Thinking & Context Length:**
307
-
308
- | Model | Max Thinking Tokens | Context Length |
309
- | -------------------- | ------------------: | -------------: |
310
- | qwen3.6-plus | 81,920 | 1,000,000 |
311
- | qwen3.5-plus | 81,920 | 1,000,000 |
312
- | qwen3-coder-plus | Not supported | 1,000,000 |
313
- | qwen3-max-2026-01-23 | 81,920 | 262,144 |
314
- | qwen3-coder-next | Not supported | 262,144 |
315
- | kimi-k2.5 | 81,920 | 262,144 |
316
- | MiniMax-M2.5 | 32,768 | 204,800 |
317
- | glm-5 | 32,768 | 202,752 |
318
- | glm-4.7 | 32,768 | 202,752 |
319
-
320
- ### Tool Search
321
-
322
- Dynamically search and load tools at runtime instead of sending all tool definitions upfront. Saves tokens and improves performance.
323
-
324
- **Why Third-Party APIs?** Claude Code disables Tool Search for third-party proxies by default. This feature enables it.
325
-
326
- **Benefits:**
327
-
328
- - **Token efficiency**: Reduces context usage for large MCP tool catalogs
329
- - **Better performance**: Faster response with deferred loading
330
- - **Proxy compatibility**: Works with Kimi and other providers
331
-
332
- **Requirements:**
333
-
334
- - Proxy must support `tool_reference` blocks
335
- - Claude Sonnet 4+ or Opus 4+ models only (not Haiku)
336
-
337
- Control via `ENABLE_TOOL_SEARCH` environment variable:
338
-
339
- | Value | Behavior |
340
- | ---------- | --------------------------------------------------- |
341
- | (unset) | Default enabled, disabled for non-first-party hosts |
342
- | `true` | Always enabled |
343
- | `auto` | Activates when MCP tools exceed 10% of context |
344
- | `auto:<N>` | Custom threshold (e.g., `auto:5` for 5%) |
345
- | `false` | Disabled, all tools loaded upfront |
346
-
347
- ```bash
348
- ENABLE_TOOL_SEARCH=auto:5 claude # 5% threshold
349
- ENABLE_TOOL_SEARCH=false claude # Disable
350
- ENABLE_TOOL_SEARCH=true claude # Always enable
351
- ```
352
-
353
- Disable MCPSearch Tool:
354
-
355
- ```json
356
- {
357
- "permissions": {
358
- "deny": ["MCPSearch"]
359
- }
360
- }
361
- ```
362
-
363
- ### Auto Mode
364
-
365
- Enable auto-mode for all models and API types, bypassing model restrictions.
366
-
367
- **Why Enable?** Claude Code restricts auto-mode to specific models (Opus/Sonnet 4.6) and first-party APIs only. This feature enables it for all models and third-party proxies.
368
-
369
- **Benefits:**
370
-
371
- - **Universal access**: Auto-mode works with any model
372
- - **Proxy support**: Compatible with Bedrock, Vertex, and third-party APIs
373
- - **No restrictions**: Bypasses remote config control
374
-
375
- **Requirements:**
376
-
377
- - Claude Code v2.1.75 or higher
378
-
379
- ```bash
380
- npx @unitsvc/cc-helper enable automode
381
- ```
382
-
383
- **Environment Variables:**
384
-
385
- | Variable | Description |
386
- | ------------------------------- | ------------------------------- |
387
- | `CC_HELPER_AUTO_MODE_MODEL` | Custom classifier model |
388
- | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | Fallback model if not specified |
389
-
390
- ### Monitor
391
-
392
- Enable the Monitor tool for streaming event monitoring.
393
-
394
- **Why Enable?** Claude Code controls the Monitor feature via remote config (`tengu_amber_sentinel` flag). This patch bypasses remote control and enables it locally.
395
-
396
- **Benefits:**
397
-
398
- - **Streaming monitoring**: Watch logs, file changes, API events in real-time
399
- - **Event-driven workflow**: Respond to events as they arrive
400
- - **Persistent monitoring**: Run long-lived monitors during the session
401
-
402
- **Requirements:**
403
-
404
- - Claude Code v2.1.100 or higher
405
-
406
- ```bash
407
- npx @unitsvc/cc-helper enable monitor
408
- ```
409
-
410
- **Examples:**
411
-
412
- ```bash
413
- # Monitor log file for errors
414
- tail -f /var/log/app.log | grep --line-buffered "ERROR"
415
-
416
- # Watch for file changes
417
- inotifywait -m --format '%e %f' /watched/dir
418
-
419
- # Poll GitHub for new PR comments
420
- while true; do
421
- gh api "repos/owner/repo/issues/123/comments?since=$last" --jq '.[].body'
422
- sleep 30
423
- done
424
- ```
425
-
426
- ---
427
-
428
- ## Features
429
-
430
- | Feature | Description |
431
- | ------------------ | ------------------------------------------------------- |
432
- | One-command enable | Enable `/loop`, `/btw`, `/keybindings` with one command |
433
- | Tool Search | Optional `/toolsearch` for third-party API proxies |
434
- | 1M Context | Optional `/context1m` for 1M context (v2.1.76+) |
435
- | Auto Mode | Optional `automode` for all models (v2.1.75+) |
436
- | Monitor | Optional `monitor` for streaming event monitoring (v2.1.100+) |
437
- | Provider config | `plan` command with vault-based API key storage |
438
- | Secret management | `vault` command for secure secret storage |
439
- | Multi-environment | `env` command for environment switching |
440
- | Git sync | `sync` command for configuration sync |
441
- | Easy restore | Automatic backup and restore |
442
- | Zero dependencies | No runtime dependencies |
443
-
444
- ### Screenshots
445
-
446
- ![/loop command hint](./docs/images/loop-1.png)
447
- ![/loop execution example](./docs/images/loop-2.png)
448
-
449
- ## Platforms
450
-
451
- | Platform | Architecture |
452
- | -------- | ------------ |
453
- | macOS | amd64, arm64 |
454
- | Linux | amd64, arm64 |
455
- | Windows | amd64, arm64 |
456
-
457
- ## License
458
-
459
- AGPL-3.0 - see [LICENSE](./LICENSE)
460
-
461
- ## Security
462
-
463
- ### Reporting Vulnerabilities
464
-
465
- If you discover a security vulnerability, please report it responsibly:
466
-
467
- 1. **Do not** open a public issue
468
- 2. Send an email to the maintainer with details
469
- 3. Allow reasonable time for the issue to be addressed before public disclosure
470
-
471
- We take security seriously and will respond to reports as quickly as possible.
1
+ # cc-helper
2
+
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)
4
+
5
+ [**English**](./README.md) | [**简体中文**](./README-zh.md)
6
+
7
+ > One command to unlock Claude Code's hidden superpowers: `/loop`, `/btw`, `/keybindings`, `/context1m`, `automode`, `monitor`, and `MCPSearch`
8
+
9
+ ---
10
+
11
+ ## Requirements
12
+
13
+ | Item | Version |
14
+ | ----------- | --------- |
15
+ | Node.js | >= 14.0.0 |
16
+ | Claude Code | v2.1.71+ |
17
+
18
+ ```bash
19
+ npm install -g @anthropic-ai/claude-code@v2.1.104
20
+ ```
21
+
22
+ ## Installation
23
+
24
+ Two ways to use (choose one):
25
+
26
+ ```bash
27
+ # Install globally (optional)
28
+ npm install -g @unitsvc/cc-helper@latest
29
+
30
+ # Or run directly without installation
31
+ npx @unitsvc/cc-helper@latest enable
32
+ ```
33
+
34
+ ### Proxy Support
35
+
36
+ If download fails, use `--proxy` flag:
37
+
38
+ ```bash
39
+ # Use default proxy
40
+ npx @unitsvc/cc-helper --proxy enable
41
+
42
+ # Use custom proxy
43
+ npx @unitsvc/cc-helper --proxy https://your-proxy.com enable
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ ```bash
49
+ # Enable default features (/loop, /btw, /keybindings)
50
+ npx @unitsvc/cc-helper enable
51
+
52
+ # Enable specific features
53
+ npx @unitsvc/cc-helper enable loop
54
+ npx @unitsvc/cc-helper enable btw
55
+ npx @unitsvc/cc-helper enable keybindings
56
+ npx @unitsvc/cc-helper enable toolsearch
57
+ npx @unitsvc/cc-helper enable context1m # or: 1m, 1M
58
+ npx @unitsvc/cc-helper enable automode # auto-mode for all models
59
+ npx @unitsvc/cc-helper enable monitor # streaming event monitoring (v2.1.98+)
60
+
61
+ # Check status
62
+ npx @unitsvc/cc-helper status
63
+
64
+ # Disable all features
65
+ npx @unitsvc/cc-helper disable
66
+ ```
67
+
68
+ ## Commands
69
+
70
+ | Command | Description |
71
+ | -------------------- | ---------------------------------------------------- |
72
+ | `enable` | Enable `/loop`, `/btw`, and `/keybindings` (default) |
73
+ | `enable loop` | Enable only `/loop` |
74
+ | `enable btw` | Enable only `/btw` |
75
+ | `enable keybindings` | Enable only `/keybindings` |
76
+ | `enable toolsearch` | Enable toolsearch (requires explicit activation) |
77
+ | `enable context1m` | Enable 1M context for Claude Opus (v2.1.76+) |
78
+ | `enable automode` | Enable auto-mode for all models (v2.1.75+) |
79
+ | `enable monitor` | Enable Monitor tool for streaming events (v2.1.100+) |
80
+ | `disable` | Restore original |
81
+ | `status` | Check current status with version requirements |
82
+
83
+ > **Note**: Running `cc-helper enable` also automatically configures recommended environment variables in `~/.claude/settings.json`:
84
+ >
85
+ > ```json
86
+ > {
87
+ > "env": {
88
+ > "DISABLE_INSTALLATION_CHECKS": "1",
89
+ > "DISABLE_AUTOUPDATER": "1",
90
+ > "DISABLE_BUG_COMMAND": "1",
91
+ > "DISABLE_ERROR_REPORTING": "1",
92
+ > "DISABLE_TELEMETRY": "1",
93
+ > "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
94
+ > "CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY": "1",
95
+ > "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
96
+ > "CLAUDE_CODE_HIDE_ACCOUNT_INFO": "1",
97
+ > "CLAUDE_CODE_NEW_INIT": "1",
98
+ > "CLAUDE_CODE_ATTRIBUTION_HEADER": "0",
99
+ > "API_TIMEOUT_MS": "3000000"
100
+ > }
101
+ > }
102
+ > ```
103
+
104
+ ---
105
+
106
+ ## Configuration Commands
107
+
108
+ ### plan Command
109
+
110
+ Configure AI providers with vault-based secret storage.
111
+
112
+ ```bash
113
+ # Add provider (auto-saves to vault + settings.json)
114
+ cc-helper plan add -p bailian -k YOUR_API_KEY
115
+ cc-helper plan add -p minimaxi -k YOUR_API_KEY --mcp
116
+
117
+ # Switch provider
118
+ cc-helper plan switch -p zai
119
+
120
+ # Switch model profile (on current provider)
121
+ cc-helper plan switch --profile 1m
122
+
123
+ # Switch provider with profile
124
+ cc-helper plan switch -p bailian -k YOUR_KEY --profile 1m
125
+
126
+ # List providers
127
+ cc-helper plan list
128
+
129
+ # Export config
130
+ cc-helper plan export --all-env -o config.json
131
+ ```
132
+
133
+ **Supported Providers:**
134
+
135
+ | Provider | Description |
136
+ | ---------- | ------------ |
137
+ | `bailian` | (CN) Aliyun |
138
+ | `minimaxi` | (CN) MiniMax |
139
+ | `glm` | (CN) Zhipu |
140
+ | `zai` | (EN) Zhipu |
141
+
142
+ **Model Profiles:**
143
+
144
+ Each provider supports multiple model profiles. A profile defines mappings for all model tiers:
145
+
146
+ | Field | Description |
147
+ | --------- | ------------------------------------------------- |
148
+ | Model | Default model (`ANTHROPIC_MODEL`) |
149
+ | Haiku | Fast model (`ANTHROPIC_DEFAULT_HAIKU_MODEL`) |
150
+ | Sonnet | Balanced model (`ANTHROPIC_DEFAULT_SONNET_MODEL`) |
151
+ | Opus | Powerful model (`ANTHROPIC_DEFAULT_OPUS_MODEL`) |
152
+ | Reasoning | Extended thinking (`ANTHROPIC_REASONING_MODEL`) |
153
+
154
+ **bailian Profiles:**
155
+
156
+ | Profile | Model | Haiku | Sonnet | Opus | Reasoning |
157
+ | ------- | ------------ | ------------ | ------------ | ------------ | ------------ |
158
+ | default | glm-5 | glm-4.7 | glm-5 | glm-5 | glm-5 |
159
+ | 5 | glm-5 | glm-5 | glm-5 | qwen3.6-plus | glm-5 |
160
+ | 1m | glm-5 | glm-4.7 | qwen3.5-plus | qwen3.5-plus | glm-5 |
161
+ | 3.6 | qwen3.6-plus | qwen3.6-plus | qwen3.6-plus | qwen3.6-plus | qwen3.6-plus |
162
+ | kimi | kimi-k2.5 | kimi-k2.5 | kimi-k2.5 | kimi-k2.5 | kimi-k2.5 |
163
+ | minimax | MiniMax-M2.5 | MiniMax-M2.5 | MiniMax-M2.5 | MiniMax-M2.5 | MiniMax-M2.5 |
164
+
165
+ **glm / zai Profiles:**
166
+
167
+ | Profile | Model | Haiku | Sonnet | Opus | Reasoning |
168
+ | ------- | ------------ | ----------- | ------- | ------------ | ------------ |
169
+ | default | glm-5 | glm-4.7 | glm-5 | glm-5 | glm-5 |
170
+ | 5 | glm-5 | glm-5-turbo | glm-5 | glm-5 | glm-5 |
171
+ | 5.1 | glm-5.1 | glm-4.7 | glm-4.7 | glm-5 | glm-5.1 |
172
+ | 5v | glm-5v-turbo | glm-5-turbo | glm-5.1 | glm-5v-turbo | glm-5v-turbo |
173
+
174
+ **minimaxi Profiles:**
175
+
176
+ | Profile | Model | Haiku | Sonnet | Opus | Reasoning |
177
+ | ------- | ------------ | ------------ | ------------ | ------------ | ------------ |
178
+ | default | MiniMax-M2.7 | MiniMax-M2.5 | MiniMax-M2.7 | MiniMax-M2.7 | MiniMax-M2.7 |
179
+
180
+ ```bash
181
+ # Example: Use 1M context on bailian
182
+ cc-helper plan add -p bailian -k YOUR_KEY
183
+ cc-helper plan switch --profile 1m
184
+ ```
185
+
186
+ ### vault Command
187
+
188
+ Secure API key storage, encrypted in `cc-helper.json`.
189
+
190
+ ```bash
191
+ cc-helper vault list # List secrets
192
+ cc-helper vault set bailian default -k "KEY" # Set
193
+ cc-helper vault get bailian default # Get & decrypt
194
+ cc-helper vault delete bailian default # Delete
195
+ ```
196
+
197
+ ### env Command
198
+
199
+ Multiple environments (default, work, staging, etc.).
200
+
201
+ ```bash
202
+ cc-helper env list # List environments
203
+ cc-helper env create work # Create
204
+ cc-helper env switch work # Switch
205
+ ```
206
+
207
+ ### sync Command
208
+
209
+ Export/import config to Git repository with JWE encryption.
210
+
211
+ ```bash
212
+ # Login to GitHub
213
+ cc-helper sync login -r https://github.com/user/repo -t ghp_xxx
214
+
215
+ # Export
216
+ cc-helper sync export
217
+ cc-helper sync export --file config.json
218
+ cc-helper sync export --workspace test
219
+
220
+ # Import
221
+ cc-helper sync import
222
+ ```
223
+
224
+ ---
225
+
226
+ ## Core Features
227
+
228
+ ### `/loop` - Scheduled Recurring Prompts
229
+
230
+ Schedule prompts for polling deployments, babysitting PRs, setting reminders, or running workflows on an interval.
231
+
232
+ ```
233
+ /loop [interval] <prompt>
234
+ ```
235
+
236
+ **Examples:**
237
+
238
+ ```
239
+ /loop 5m check if the deployment finished
240
+ /loop 30m /review-pr 1234
241
+ /loop remind me to push the release at 3pm
242
+ ```
243
+
244
+ | Form | Example | Parsed Interval |
245
+ | ---------------- | --------------------------- | ---------------------- |
246
+ | Leading token | `/loop 30m check` | every 30 minutes |
247
+ | Trailing `every` | `/loop check every 2 hours` | every 2 hours |
248
+ | No interval | `/loop check` | defaults to 10 minutes |
249
+
250
+ Supported units: `s` (seconds), `m` (minutes), `h` (hours), `d` (days)
251
+
252
+ **Key Features:**
253
+
254
+ - **Session-scoped**: Tasks live in the current session and disappear on exit
255
+ - **Auto-expiry**: Tasks expire after 3 days
256
+ - **Jitter protection**: Small offsets prevent API thundering herd
257
+ - **Low priority**: Fires between your turns, not while Claude is busy
258
+
259
+ ```
260
+ what scheduled tasks do I have? # List all tasks
261
+ cancel the deploy check job # Cancel by description or ID
262
+ ```
263
+
264
+ ### `/btw` - Side Questions
265
+
266
+ Ask side questions without disrupting the main conversation flow.
267
+
268
+ ```
269
+ /btw <question>
270
+ ```
271
+
272
+ **Examples:**
273
+
274
+ ```
275
+ /btw what does this function do?
276
+ /btw explain the error handling here
277
+ /btw why use async/await in this case?
278
+ ```
279
+
280
+ ### `/keybindings` - Custom Keyboard Shortcuts
281
+
282
+ Configure in `~/.claude/keybindings.json`:
283
+
284
+ ```json
285
+ {
286
+ "submit": ["ctrl+s"],
287
+ "interrupt": ["ctrl+c"],
288
+ "custom_commands": {
289
+ "ctrl+shift+l": "/loop 5m check status"
290
+ }
291
+ }
292
+ ```
293
+
294
+ ### `/context1m` - 1M Token Context
295
+
296
+ Enable 1M token context window for Claude Opus models.
297
+
298
+ **Requirements:**
299
+
300
+ - Claude Code v2.1.76 or higher
301
+ - Claude Opus 4+ model
302
+ - May require Pro plan or first-party API
303
+
304
+ ![/context1m enable](./docs/images/1m-1.png)
305
+
306
+ **Extended Thinking & Context Length:**
307
+
308
+ | Model | Max Thinking Tokens | Context Length |
309
+ | -------------------- | ------------------: | -------------: |
310
+ | qwen3.6-plus | 81,920 | 1,000,000 |
311
+ | qwen3.5-plus | 81,920 | 1,000,000 |
312
+ | qwen3-coder-plus | Not supported | 1,000,000 |
313
+ | qwen3-max-2026-01-23 | 81,920 | 262,144 |
314
+ | qwen3-coder-next | Not supported | 262,144 |
315
+ | kimi-k2.5 | 81,920 | 262,144 |
316
+ | MiniMax-M2.5 | 32,768 | 204,800 |
317
+ | glm-5 | 32,768 | 202,752 |
318
+ | glm-4.7 | 32,768 | 202,752 |
319
+
320
+ ### Tool Search
321
+
322
+ Dynamically search and load tools at runtime instead of sending all tool definitions upfront. Saves tokens and improves performance.
323
+
324
+ **Why Third-Party APIs?** Claude Code disables Tool Search for third-party proxies by default. This feature enables it.
325
+
326
+ **Benefits:**
327
+
328
+ - **Token efficiency**: Reduces context usage for large MCP tool catalogs
329
+ - **Better performance**: Faster response with deferred loading
330
+ - **Proxy compatibility**: Works with Kimi and other providers
331
+
332
+ **Requirements:**
333
+
334
+ - Proxy must support `tool_reference` blocks
335
+ - Claude Sonnet 4+ or Opus 4+ models only (not Haiku)
336
+
337
+ Control via `ENABLE_TOOL_SEARCH` environment variable:
338
+
339
+ | Value | Behavior |
340
+ | ---------- | --------------------------------------------------- |
341
+ | (unset) | Default enabled, disabled for non-first-party hosts |
342
+ | `true` | Always enabled |
343
+ | `auto` | Activates when MCP tools exceed 10% of context |
344
+ | `auto:<N>` | Custom threshold (e.g., `auto:5` for 5%) |
345
+ | `false` | Disabled, all tools loaded upfront |
346
+
347
+ ```bash
348
+ ENABLE_TOOL_SEARCH=auto:5 claude # 5% threshold
349
+ ENABLE_TOOL_SEARCH=false claude # Disable
350
+ ENABLE_TOOL_SEARCH=true claude # Always enable
351
+ ```
352
+
353
+ Disable MCPSearch Tool:
354
+
355
+ ```json
356
+ {
357
+ "permissions": {
358
+ "deny": ["MCPSearch"]
359
+ }
360
+ }
361
+ ```
362
+
363
+ ### Auto Mode
364
+
365
+ Enable auto-mode for all models and API types, bypassing model restrictions.
366
+
367
+ **Why Enable?** Claude Code restricts auto-mode to specific models (Opus/Sonnet 4.6) and first-party APIs only. This feature enables it for all models and third-party proxies.
368
+
369
+ **Benefits:**
370
+
371
+ - **Universal access**: Auto-mode works with any model
372
+ - **Proxy support**: Compatible with Bedrock, Vertex, and third-party APIs
373
+ - **No restrictions**: Bypasses remote config control
374
+
375
+ **Requirements:**
376
+
377
+ - Claude Code v2.1.75 or higher
378
+
379
+ ```bash
380
+ npx @unitsvc/cc-helper enable automode
381
+ ```
382
+
383
+ **Environment Variables:**
384
+
385
+ | Variable | Description |
386
+ | ------------------------------- | ------------------------------- |
387
+ | `CC_HELPER_AUTO_MODE_MODEL` | Custom classifier model |
388
+ | `ANTHROPIC_DEFAULT_HAIKU_MODEL` | Fallback model if not specified |
389
+
390
+ ### Monitor
391
+
392
+ Enable the Monitor tool for streaming event monitoring.
393
+
394
+ **Benefits:**
395
+
396
+ - **Streaming monitoring**: Watch logs, file changes, API events in real-time
397
+ - **Event-driven workflow**: Respond to events as they arrive
398
+ - **Persistent monitoring**: Run long-lived monitors during the session
399
+
400
+ **Requirements:**
401
+
402
+ - Claude Code v2.1.98 or higher
403
+
404
+ ```bash
405
+ npx @unitsvc/cc-helper enable monitor
406
+ ```
407
+
408
+ **Examples:**
409
+
410
+ ```bash
411
+ # Monitor log file for errors
412
+ tail -f /var/log/app.log | grep --line-buffered "ERROR"
413
+
414
+ # Watch for file changes
415
+ inotifywait -m --format '%e %f' /watched/dir
416
+
417
+ # Poll GitHub for new PR comments
418
+ while true; do
419
+ gh api "repos/owner/repo/issues/123/comments?since=$last" --jq '.[].body'
420
+ sleep 30
421
+ done
422
+ ```
423
+
424
+ ---
425
+
426
+ ## Features
427
+
428
+ | Feature | Description |
429
+ | ------------------ | ------------------------------------------------------------- |
430
+ | One-command enable | Enable `/loop`, `/btw`, `/keybindings` with one command |
431
+ | Tool Search | Optional `/toolsearch` for third-party API proxies |
432
+ | 1M Context | Optional `/context1m` for 1M context (v2.1.76+) |
433
+ | Auto Mode | Optional `automode` for all models (v2.1.75+) |
434
+ | Monitor | Optional `monitor` for streaming event monitoring (v2.1.100+) |
435
+ | Provider config | `plan` command with vault-based API key storage |
436
+ | Secret management | `vault` command for secure secret storage |
437
+ | Multi-environment | `env` command for environment switching |
438
+ | Git sync | `sync` command for configuration sync |
439
+ | Easy restore | Automatic backup and restore |
440
+ | Zero dependencies | No runtime dependencies |
441
+
442
+ ### Screenshots
443
+
444
+ ![/loop command hint](./docs/images/loop-1.png)
445
+ ![/loop execution example](./docs/images/loop-2.png)
446
+
447
+ ## Platforms
448
+
449
+ | Platform | Architecture |
450
+ | -------- | ------------ |
451
+ | macOS | amd64, arm64 |
452
+ | Linux | amd64, arm64 |
453
+ | Windows | amd64, arm64 |
454
+
455
+ ## License
456
+
457
+ AGPL-3.0 - see [LICENSE](./LICENSE)
458
+
459
+ ## Security
460
+
461
+ ### Reporting Vulnerabilities
462
+
463
+ If you discover a security vulnerability, please report it responsibly:
464
+
465
+ 1. **Do not** open a public issue
466
+ 2. Send an email to the maintainer with details
467
+ 3. Allow reasonable time for the issue to be addressed before public disclosure
468
+
469
+ We take security seriously and will respond to reports as quickly as possible.