@unitsvc/cc-helper 1.0.18 → 1.0.19
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 +102 -1
- package/README.md +102 -0
- package/package.json +1 -1
package/README-zh.md
CHANGED
|
@@ -17,6 +17,18 @@
|
|
|
17
17
|
npm install -g @anthropic-ai/claude-code@v2.1.76
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
## 安装
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install -g @unitsvc/cc-helper@latest
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
或直接使用 npx 运行:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx @unitsvc/cc-helper enable
|
|
30
|
+
```
|
|
31
|
+
|
|
20
32
|
## 使用方法
|
|
21
33
|
|
|
22
34
|
```bash
|
|
@@ -244,12 +256,101 @@ npx @unitsvc/cc-helper enable 1M
|
|
|
244
256
|
| glm-5 | 32,768 | 202,752 |
|
|
245
257
|
| glm-4.7 | 32,768 | 202,752 |
|
|
246
258
|
|
|
259
|
+
## plan 命令 - 配置 Provider
|
|
260
|
+
|
|
261
|
+
`cc-helper plan` 命令帮助配置 AI Provider,支持 vault 加密存储。
|
|
262
|
+
|
|
263
|
+
```bash
|
|
264
|
+
# 添加 Provider(自动保存到 vault + settings.json)
|
|
265
|
+
cc-helper plan add -p bailian -k YOUR_API_KEY
|
|
266
|
+
cc-helper plan add -p minimaxi -k YOUR_API_KEY --mcp
|
|
267
|
+
|
|
268
|
+
# 切换 Provider(自动从 vault 获取密钥)
|
|
269
|
+
cc-helper plan switch -p zai
|
|
270
|
+
|
|
271
|
+
# 列出已配置的 Provider
|
|
272
|
+
cc-helper plan list
|
|
273
|
+
|
|
274
|
+
# 导出配置
|
|
275
|
+
cc-helper plan export --all-env -o config.json
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**支持的 Provider:**
|
|
279
|
+
|
|
280
|
+
- `bailian` - (CN) Aliyun
|
|
281
|
+
- `minimaxi` - (CN) MiniMax
|
|
282
|
+
- `glm` - (CN) Zhipu
|
|
283
|
+
- `zai` - (EN) Zhipu
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## vault 命令 - 密钥管理
|
|
288
|
+
|
|
289
|
+
安全的密钥存储,加密存储在 `cc-helper.json` 中。
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
# 列出所有密钥
|
|
293
|
+
cc-helper vault list
|
|
294
|
+
|
|
295
|
+
# 设置密钥
|
|
296
|
+
cc-helper vault set bailian default -k "YOUR_API_KEY"
|
|
297
|
+
|
|
298
|
+
# 获取并解密密钥
|
|
299
|
+
cc-helper vault get bailian default
|
|
300
|
+
|
|
301
|
+
# 删除密钥
|
|
302
|
+
cc-helper vault delete bailian default
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## env 命令 - 环境管理
|
|
308
|
+
|
|
309
|
+
支持多环境配置(default、work、staging 等)。
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
# 列出环境
|
|
313
|
+
cc-helper env list
|
|
314
|
+
|
|
315
|
+
# 创建环境
|
|
316
|
+
cc-helper env create work
|
|
317
|
+
|
|
318
|
+
# 切换环境
|
|
319
|
+
cc-helper env switch work
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## sync 命令 - 配置同步
|
|
325
|
+
|
|
326
|
+
将配置导出/导入到 Git 仓库,支持 JWE 加密。
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
# 登录 GitHub
|
|
330
|
+
cc-helper sync login -r https://github.com/user/repo -t ghp_xxx
|
|
331
|
+
|
|
332
|
+
# 导出到 Git 仓库
|
|
333
|
+
cc-helper sync export
|
|
334
|
+
|
|
335
|
+
# 导出到文件
|
|
336
|
+
cc-helper sync export --file config.json
|
|
337
|
+
cc-helper sync export --workspace test # 使用工作区配置
|
|
338
|
+
|
|
339
|
+
# 导入配置
|
|
340
|
+
cc-helper sync import
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
247
345
|
## 功能特点
|
|
248
346
|
|
|
249
347
|
- 一键启用 `/loop`、`/btw`、`/keybindings` 功能
|
|
250
348
|
- 可选 `/toolsearch` 用于第三方 API 代理
|
|
251
349
|
- 可选 `/context1m` 用于 1M 上下文窗口(v2.1.76+)
|
|
252
|
-
-
|
|
350
|
+
- `plan` 命令支持 vault 加密存储 API 密钥
|
|
351
|
+
- `vault` 命令安全管理密钥
|
|
352
|
+
- `env` 命令支持多环境配置
|
|
353
|
+
- `sync` 命令支持 Git 仓库同步
|
|
253
354
|
- 轻松恢复原始状态
|
|
254
355
|
- 自动备份原文件
|
|
255
356
|
- 自动禁用 npm 弃用警告
|
package/README.md
CHANGED
|
@@ -17,6 +17,18 @@
|
|
|
17
17
|
npm install -g @anthropic-ai/claude-code@v2.1.76
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install -g @unitsvc/cc-helper@latest
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or use without installation:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx @unitsvc/cc-helper enable
|
|
30
|
+
```
|
|
31
|
+
|
|
20
32
|
## Usage
|
|
21
33
|
|
|
22
34
|
```bash
|
|
@@ -256,11 +268,101 @@ When using third-party API proxies, extended thinking (reasoning) capabilities a
|
|
|
256
268
|
| glm-5 | 32,768 | 202,752 |
|
|
257
269
|
| glm-4.7 | 32,768 | 202,752 |
|
|
258
270
|
|
|
271
|
+
## plan Command - Configure Provider
|
|
272
|
+
|
|
273
|
+
Configure AI providers with vault-based secret storage.
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
# Add provider (auto-saves to vault + settings.json)
|
|
277
|
+
cc-helper plan add -p bailian -k YOUR_API_KEY
|
|
278
|
+
cc-helper plan add -p minimaxi -k YOUR_API_KEY --mcp
|
|
279
|
+
|
|
280
|
+
# Switch provider (auto-retrieves key from vault)
|
|
281
|
+
cc-helper plan switch -p zai
|
|
282
|
+
|
|
283
|
+
# List configured providers
|
|
284
|
+
cc-helper plan list
|
|
285
|
+
|
|
286
|
+
# Export configuration
|
|
287
|
+
cc-helper plan export --all-env -o config.json
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**Supported Providers:**
|
|
291
|
+
|
|
292
|
+
- `bailian` - (CN) Aliyun
|
|
293
|
+
- `minimaxi` - (CN) MiniMax
|
|
294
|
+
- `glm` - (CN) Zhipu
|
|
295
|
+
- `zai` - (EN) Zhipu
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## vault Command - Secret Management
|
|
300
|
+
|
|
301
|
+
Securely store API keys encrypted in `cc-helper.json`.
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
# List all secrets
|
|
305
|
+
cc-helper vault list
|
|
306
|
+
|
|
307
|
+
# Set a secret
|
|
308
|
+
cc-helper vault set bailian default -k "YOUR_API_KEY"
|
|
309
|
+
|
|
310
|
+
# Get and decrypt a secret
|
|
311
|
+
cc-helper vault get bailian default
|
|
312
|
+
|
|
313
|
+
# Delete a secret
|
|
314
|
+
cc-helper vault delete bailian default
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## env Command - Environment Management
|
|
320
|
+
|
|
321
|
+
Support multiple environments (default, work, staging, etc.).
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
# List environments
|
|
325
|
+
cc-helper env list
|
|
326
|
+
|
|
327
|
+
# Create environment
|
|
328
|
+
cc-helper env create work
|
|
329
|
+
|
|
330
|
+
# Switch environment
|
|
331
|
+
cc-helper env switch work
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## sync Command - Configuration Sync
|
|
337
|
+
|
|
338
|
+
Export/import configuration to/from Git repository with JWE encryption.
|
|
339
|
+
|
|
340
|
+
```bash
|
|
341
|
+
# Login to GitHub
|
|
342
|
+
cc-helper sync login -r https://github.com/user/repo -t ghp_xxx
|
|
343
|
+
|
|
344
|
+
# Export to Git repository
|
|
345
|
+
cc-helper sync export
|
|
346
|
+
|
|
347
|
+
# Export to file
|
|
348
|
+
cc-helper sync export --file config.json
|
|
349
|
+
cc-helper sync export --workspace test # Use workspace config
|
|
350
|
+
|
|
351
|
+
# Import configuration
|
|
352
|
+
cc-helper sync import
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
259
357
|
## Features
|
|
260
358
|
|
|
261
359
|
- Enable `/loop`, `/btw`, `/keybindings` with one command
|
|
262
360
|
- Optional `/toolsearch` for third-party API proxies
|
|
263
361
|
- Optional `/context1m` for 1M context window (v2.1.76+)
|
|
362
|
+
- `plan` command with vault-based API key storage
|
|
363
|
+
- `vault` command for secure secret management
|
|
364
|
+
- `env` command for multi-environment support
|
|
365
|
+
- `sync` command for Git repository sync
|
|
264
366
|
- Enable specific features individually
|
|
265
367
|
- Easy restore functionality
|
|
266
368
|
- Automatic backup
|