ccman 3.1.2 → 3.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.
- package/README.md +79 -14
- package/dist/index.js +58 -44
- package/dist/templates/codex/config.toml +5 -4
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# ccman
|
|
2
2
|
|
|
3
|
-
> Codex
|
|
3
|
+
> Codex、Claude Code、Gemini CLI 和 MCP 的配置管理工具,一键切换 API 服务商配置和管理 MCP 服务器。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## ✨ 核心特性
|
|
8
8
|
|
|
9
9
|
- 🔄 **一键切换**:一条命令切换服务商,自动修改配置文件
|
|
10
|
-
- 📦
|
|
10
|
+
- 📦 **内置预设**:提供多个预设模板(Claude: 7 个,Gemini: 3 个,Codex: 1 个,MCP: 多个),只需填写 API Key
|
|
11
11
|
- 🛠️ **自定义配置**:支持添加任意第三方服务商
|
|
12
12
|
- 🔐 **零破坏性**:只修改管理的字段,写入前备份,失败回滚
|
|
13
|
-
- 🎯
|
|
13
|
+
- 🎯 **多工具支持**:同时管理 Codex、Claude Code、Gemini CLI 和 MCP 服务器
|
|
14
14
|
- 📱 **双界面**:提供 CLI(命令行)和 Desktop(图形界面)
|
|
15
15
|
- 🔁 **克隆功能**:快速复制配置,管理多个 API Key
|
|
16
16
|
- ☁️ **WebDAV 同步**(可选):同步配置到你自己的 WebDAV 服务器(iCloud/Dropbox)
|
|
@@ -23,8 +23,10 @@
|
|
|
23
23
|
|
|
24
24
|
ccman 的核心功能是自动化配置文件的切换:
|
|
25
25
|
|
|
26
|
-
- **Codex**:自动修改 `~/.codex/config.toml`
|
|
26
|
+
- **Codex**:自动修改 `~/.codex/config.toml`
|
|
27
27
|
- **Claude Code**:自动修改 `~/.claude/settings.json`
|
|
28
|
+
- **Gemini CLI**:自动修改 `~/.gemini/settings.json` 和 `~/.gemini/.env`
|
|
29
|
+
- **MCP**:管理 MCP 服务器配置,并同步到 Claude Code 和 Gemini CLI
|
|
28
30
|
- **备份机制**:写入前自动备份,失败时自动回滚
|
|
29
31
|
|
|
30
32
|
如果你更喜欢手动编辑配置文件,或者只使用一个服务商从不切换,可能不需要这个工具。
|
|
@@ -63,7 +65,11 @@ Options:
|
|
|
63
65
|
Commands:
|
|
64
66
|
cx 管理 Codex 服务商
|
|
65
67
|
cc 管理 Claude 服务商
|
|
68
|
+
gm 管理 Gemini CLI 服务商
|
|
69
|
+
mcp 管理 MCP 服务器
|
|
66
70
|
sync WebDAV 同步配置
|
|
71
|
+
export [dir] 导出配置
|
|
72
|
+
import [dir] 导入配置
|
|
67
73
|
help [command] display help for command
|
|
68
74
|
```
|
|
69
75
|
|
|
@@ -135,13 +141,32 @@ $ ccman cc current
|
|
|
135
141
|
最后使用: 2025/10/11 20:14:08
|
|
136
142
|
```
|
|
137
143
|
|
|
144
|
+
### 管理 Gemini CLI 服务商
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
ccman gm # 进入交互式菜单
|
|
148
|
+
ccman gm add # 添加服务商
|
|
149
|
+
ccman gm use # 切换服务商
|
|
150
|
+
ccman gm list # 查看所有服务商
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### 管理 MCP 服务器
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
ccman mcp add # 添加 MCP 服务器
|
|
157
|
+
ccman mcp list # 查看所有 MCP 服务器
|
|
158
|
+
ccman mcp edit # 编辑 MCP 服务器
|
|
159
|
+
ccman mcp remove # 删除 MCP 服务器
|
|
160
|
+
```
|
|
161
|
+
|
|
138
162
|
---
|
|
139
163
|
|
|
140
164
|
## 完整命令
|
|
141
165
|
|
|
142
166
|
| 命令 | 说明 |
|
|
143
167
|
|------|------|
|
|
144
|
-
| `ccman` | 主菜单(选择 Codex 或
|
|
168
|
+
| `ccman` | 主菜单(选择 Codex、Claude Code 或 Gemini CLI) |
|
|
169
|
+
| **Codex 管理** | |
|
|
145
170
|
| `ccman cx` | Codex 交互式菜单 |
|
|
146
171
|
| `ccman cx add` | 添加 Codex 服务商(支持预设模板和自定义) |
|
|
147
172
|
| `ccman cx list` | 列出所有 Codex 服务商 |
|
|
@@ -149,7 +174,8 @@ $ ccman cc current
|
|
|
149
174
|
| `ccman cx current` | 查看当前 Codex 服务商 |
|
|
150
175
|
| `ccman cx edit [name]` | 编辑 Codex 服务商 |
|
|
151
176
|
| `ccman cx remove [name]` | 删除 Codex 服务商 |
|
|
152
|
-
| `ccman cx clone [source]` | 克隆 Codex
|
|
177
|
+
| `ccman cx clone [source]` | 克隆 Codex 服务商 |
|
|
178
|
+
| **Claude Code 管理** | |
|
|
153
179
|
| `ccman cc` | Claude Code 交互式菜单 |
|
|
154
180
|
| `ccman cc add` | 添加 Claude Code 服务商 |
|
|
155
181
|
| `ccman cc list` | 列出所有 Claude Code 服务商 |
|
|
@@ -158,7 +184,24 @@ $ ccman cc current
|
|
|
158
184
|
| `ccman cc edit [name]` | 编辑 Claude Code 服务商 |
|
|
159
185
|
| `ccman cc remove [name]` | 删除 Claude Code 服务商 |
|
|
160
186
|
| `ccman cc clone [source]` | 克隆 Claude Code 服务商 |
|
|
187
|
+
| **Gemini CLI 管理** | |
|
|
188
|
+
| `ccman gm` | Gemini CLI 交互式菜单 |
|
|
189
|
+
| `ccman gm add` | 添加 Gemini CLI 服务商 |
|
|
190
|
+
| `ccman gm list` | 列出所有 Gemini CLI 服务商 |
|
|
191
|
+
| `ccman gm use [name]` | 切换 Gemini CLI 服务商 |
|
|
192
|
+
| `ccman gm current` | 查看当前 Gemini CLI 服务商 |
|
|
193
|
+
| `ccman gm edit [name]` | 编辑 Gemini CLI 服务商 |
|
|
194
|
+
| `ccman gm remove [name]` | 删除 Gemini CLI 服务商 |
|
|
195
|
+
| `ccman gm clone [source]` | 克隆 Gemini CLI 服务商 |
|
|
196
|
+
| **MCP 服务器管理** | |
|
|
197
|
+
| `ccman mcp add` | 添加 MCP 服务器 |
|
|
198
|
+
| `ccman mcp list` | 列出所有 MCP 服务器 |
|
|
199
|
+
| `ccman mcp edit [name]` | 编辑 MCP 服务器 |
|
|
200
|
+
| `ccman mcp remove [name]` | 删除 MCP 服务器 |
|
|
201
|
+
| **配置同步和导入导出** | |
|
|
161
202
|
| `ccman sync` | WebDAV 同步配置(备份/恢复/合并) |
|
|
203
|
+
| `ccman export [dir]` | 导出配置到本地目录 |
|
|
204
|
+
| `ccman import [dir]` | 从本地目录导入配置 |
|
|
162
205
|
|
|
163
206
|
---
|
|
164
207
|
|
|
@@ -166,16 +209,36 @@ $ ccman cc current
|
|
|
166
209
|
|
|
167
210
|
添加服务商时可以选择"使用预设模板",只需填写 API Key:
|
|
168
211
|
|
|
212
|
+
### Claude Code 预设(7 个)
|
|
213
|
+
|
|
169
214
|
| 预设名称 | Base URL |
|
|
170
215
|
|---------|----------|
|
|
171
216
|
| Anthropic Official | `https://api.anthropic.com` |
|
|
172
217
|
| AnyRouter | `https://anyrouter.top` |
|
|
173
218
|
| PackyCode | `https://api.packycode.com` |
|
|
174
|
-
| CoordCode | `https://api.coordcode.com/api` |
|
|
175
219
|
| 88Code | `https://www.88code.org/api` |
|
|
220
|
+
| KKYYXX | `https://api.kkyyxx.cc` |
|
|
176
221
|
| BigModel | `https://open.bigmodel.cn/api/anthropic` |
|
|
177
222
|
| ModelScope | `https://api-inference.modelscope.cn/v1/chat/completions` |
|
|
178
223
|
|
|
224
|
+
### Gemini CLI 预设(3 个)
|
|
225
|
+
|
|
226
|
+
| 预设名称 | Base URL |
|
|
227
|
+
|---------|----------|
|
|
228
|
+
| Google Gemini | `https://generativelanguage.googleapis.com` |
|
|
229
|
+
| PackyAPI | `https://api.packyapi.com` |
|
|
230
|
+
| LiteLLM Proxy | `http://localhost:4000` |
|
|
231
|
+
|
|
232
|
+
### Codex 预设(1 个)
|
|
233
|
+
|
|
234
|
+
| 预设名称 | Base URL |
|
|
235
|
+
|---------|----------|
|
|
236
|
+
| 88Code | `https://www.88code.org/api` |
|
|
237
|
+
|
|
238
|
+
### MCP 预设(多个)
|
|
239
|
+
|
|
240
|
+
MCP 服务器预设包括:filesystem、github、postgres、brave-search、fetch、memory 等多个常用 MCP 服务器模板。
|
|
241
|
+
|
|
179
242
|
也可以选择"自定义配置",手动填写 Base URL。
|
|
180
243
|
|
|
181
244
|
---
|
|
@@ -256,14 +319,16 @@ $ ccman cc use "Claude Test"
|
|
|
256
319
|
|
|
257
320
|
## 配置文件
|
|
258
321
|
|
|
259
|
-
**ccman
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
- `~/.
|
|
263
|
-
- `~/.
|
|
322
|
+
**ccman 配置**:
|
|
323
|
+
- `~/.ccman/codex.json` - Codex 服务商配置
|
|
324
|
+
- `~/.ccman/claude.json` - Claude Code 服务商配置
|
|
325
|
+
- `~/.ccman/gemini.json` - Gemini CLI 服务商配置
|
|
326
|
+
- `~/.ccman/mcp.json` - MCP 服务器配置
|
|
264
327
|
|
|
265
|
-
|
|
266
|
-
- `~/.
|
|
328
|
+
**工具配置**(ccman 会自动修改):
|
|
329
|
+
- **Codex**: `~/.codex/config.toml`
|
|
330
|
+
- **Claude Code**: `~/.claude/settings.json`
|
|
331
|
+
- **Gemini CLI**: `~/.gemini/settings.json` 和 `~/.gemini/.env`
|
|
267
332
|
|
|
268
333
|
**零破坏性承诺**:
|
|
269
334
|
- 只修改管理的字段,保留其他所有配置
|
package/dist/index.js
CHANGED
|
@@ -15,9 +15,9 @@ var init_package = __esm({
|
|
|
15
15
|
"../core/package.json"() {
|
|
16
16
|
package_default = {
|
|
17
17
|
name: "@ccman/core",
|
|
18
|
-
version: "3.1
|
|
18
|
+
version: "3.2.1",
|
|
19
19
|
type: "module",
|
|
20
|
-
description: "Core business logic for ccman",
|
|
20
|
+
description: "Core business logic for ccman - Manage Codex, Claude Code, Gemini CLI, and MCP configurations",
|
|
21
21
|
main: "./dist/index.js",
|
|
22
22
|
types: "./dist/index.d.ts",
|
|
23
23
|
files: [
|
|
@@ -34,6 +34,10 @@ var init_package = __esm({
|
|
|
34
34
|
"codex",
|
|
35
35
|
"claude",
|
|
36
36
|
"claude-code",
|
|
37
|
+
"gemini",
|
|
38
|
+
"gemini-cli",
|
|
39
|
+
"mcp",
|
|
40
|
+
"model-context-protocol",
|
|
37
41
|
"ai",
|
|
38
42
|
"api",
|
|
39
43
|
"config",
|
|
@@ -51,6 +55,7 @@ var init_package = __esm({
|
|
|
51
55
|
url: "https://github.com/2ue/ccman/issues"
|
|
52
56
|
},
|
|
53
57
|
dependencies: {
|
|
58
|
+
"@ccman/types": "workspace:*",
|
|
54
59
|
"@iarna/toml": "^2.2.5",
|
|
55
60
|
"proper-lockfile": "^4.1.2",
|
|
56
61
|
webdav: "^5.8.0"
|
|
@@ -65,10 +70,10 @@ var init_package = __esm({
|
|
|
65
70
|
}
|
|
66
71
|
});
|
|
67
72
|
|
|
68
|
-
// ../
|
|
73
|
+
// ../types/dist/index.js
|
|
69
74
|
var TOOL_TYPES, MAIN_TOOL_TYPES, TOOL_CONFIG;
|
|
70
|
-
var
|
|
71
|
-
"../
|
|
75
|
+
var init_dist = __esm({
|
|
76
|
+
"../types/dist/index.js"() {
|
|
72
77
|
"use strict";
|
|
73
78
|
TOOL_TYPES = {
|
|
74
79
|
CODEX: "codex",
|
|
@@ -118,6 +123,15 @@ var init_constants = __esm({
|
|
|
118
123
|
}
|
|
119
124
|
});
|
|
120
125
|
|
|
126
|
+
// ../core/dist/constants.js
|
|
127
|
+
var init_constants = __esm({
|
|
128
|
+
"../core/dist/constants.js"() {
|
|
129
|
+
"use strict";
|
|
130
|
+
init_dist();
|
|
131
|
+
init_dist();
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
121
135
|
// ../core/dist/paths.js
|
|
122
136
|
import * as os from "os";
|
|
123
137
|
import * as path from "path";
|
|
@@ -2126,7 +2140,7 @@ var init_claude_clean = __esm({
|
|
|
2126
2140
|
|
|
2127
2141
|
// ../core/dist/index.js
|
|
2128
2142
|
var VERSION;
|
|
2129
|
-
var
|
|
2143
|
+
var init_dist2 = __esm({
|
|
2130
2144
|
"../core/dist/index.js"() {
|
|
2131
2145
|
"use strict";
|
|
2132
2146
|
init_package();
|
|
@@ -2179,7 +2193,7 @@ function getSyncConfigPath() {
|
|
|
2179
2193
|
var init_sync_config = __esm({
|
|
2180
2194
|
"src/utils/sync-config.ts"() {
|
|
2181
2195
|
"use strict";
|
|
2182
|
-
|
|
2196
|
+
init_dist2();
|
|
2183
2197
|
}
|
|
2184
2198
|
});
|
|
2185
2199
|
|
|
@@ -2387,7 +2401,7 @@ var init_config2 = __esm({
|
|
|
2387
2401
|
"src/commands/sync/config.ts"() {
|
|
2388
2402
|
"use strict";
|
|
2389
2403
|
init_sync_config();
|
|
2390
|
-
|
|
2404
|
+
init_dist2();
|
|
2391
2405
|
}
|
|
2392
2406
|
});
|
|
2393
2407
|
|
|
@@ -2468,7 +2482,7 @@ function testCommand(program2) {
|
|
|
2468
2482
|
var init_test = __esm({
|
|
2469
2483
|
"src/commands/sync/test.ts"() {
|
|
2470
2484
|
"use strict";
|
|
2471
|
-
|
|
2485
|
+
init_dist2();
|
|
2472
2486
|
init_helpers();
|
|
2473
2487
|
}
|
|
2474
2488
|
});
|
|
@@ -2546,7 +2560,7 @@ function uploadCommand(program2) {
|
|
|
2546
2560
|
var init_upload = __esm({
|
|
2547
2561
|
"src/commands/sync/upload.ts"() {
|
|
2548
2562
|
"use strict";
|
|
2549
|
-
|
|
2563
|
+
init_dist2();
|
|
2550
2564
|
init_helpers();
|
|
2551
2565
|
}
|
|
2552
2566
|
});
|
|
@@ -2620,7 +2634,7 @@ function downloadCommand(program2) {
|
|
|
2620
2634
|
var init_download = __esm({
|
|
2621
2635
|
"src/commands/sync/download.ts"() {
|
|
2622
2636
|
"use strict";
|
|
2623
|
-
|
|
2637
|
+
init_dist2();
|
|
2624
2638
|
init_helpers();
|
|
2625
2639
|
}
|
|
2626
2640
|
});
|
|
@@ -2686,7 +2700,7 @@ function mergeCommand(program2) {
|
|
|
2686
2700
|
var init_merge2 = __esm({
|
|
2687
2701
|
"src/commands/sync/merge.ts"() {
|
|
2688
2702
|
"use strict";
|
|
2689
|
-
|
|
2703
|
+
init_dist2();
|
|
2690
2704
|
init_helpers();
|
|
2691
2705
|
}
|
|
2692
2706
|
});
|
|
@@ -2742,7 +2756,7 @@ function statusCommand(program2) {
|
|
|
2742
2756
|
var init_status = __esm({
|
|
2743
2757
|
"src/commands/sync/status.ts"() {
|
|
2744
2758
|
"use strict";
|
|
2745
|
-
|
|
2759
|
+
init_dist2();
|
|
2746
2760
|
init_sync_config();
|
|
2747
2761
|
}
|
|
2748
2762
|
});
|
|
@@ -2862,7 +2876,7 @@ import { Command as Command3 } from "commander";
|
|
|
2862
2876
|
import chalk40 from "chalk";
|
|
2863
2877
|
|
|
2864
2878
|
// src/utils/logo.ts
|
|
2865
|
-
|
|
2879
|
+
init_dist2();
|
|
2866
2880
|
import chalk from "chalk";
|
|
2867
2881
|
function printLogo() {
|
|
2868
2882
|
console.log(
|
|
@@ -2883,12 +2897,12 @@ function printLogo() {
|
|
|
2883
2897
|
}
|
|
2884
2898
|
|
|
2885
2899
|
// src/commands/codex/add.ts
|
|
2886
|
-
|
|
2900
|
+
init_dist2();
|
|
2887
2901
|
import chalk12 from "chalk";
|
|
2888
2902
|
import inquirer8 from "inquirer";
|
|
2889
2903
|
|
|
2890
2904
|
// src/interactive.ts
|
|
2891
|
-
|
|
2905
|
+
init_dist2();
|
|
2892
2906
|
import inquirer7 from "inquirer";
|
|
2893
2907
|
import chalk11 from "chalk";
|
|
2894
2908
|
|
|
@@ -3524,7 +3538,7 @@ function addCommand(program2) {
|
|
|
3524
3538
|
}
|
|
3525
3539
|
|
|
3526
3540
|
// src/commands/codex/list.ts
|
|
3527
|
-
|
|
3541
|
+
init_dist2();
|
|
3528
3542
|
import chalk13 from "chalk";
|
|
3529
3543
|
function listCommand(program2) {
|
|
3530
3544
|
program2.command("list").alias("ls").description("\u5217\u51FA\u6240\u6709 Codex \u670D\u52A1\u5546").action(async () => {
|
|
@@ -3550,7 +3564,7 @@ function listCommand(program2) {
|
|
|
3550
3564
|
}
|
|
3551
3565
|
|
|
3552
3566
|
// src/commands/codex/use.ts
|
|
3553
|
-
|
|
3567
|
+
init_dist2();
|
|
3554
3568
|
import chalk14 from "chalk";
|
|
3555
3569
|
import inquirer9 from "inquirer";
|
|
3556
3570
|
function useCommand(program2) {
|
|
@@ -3613,7 +3627,7 @@ function useCommand(program2) {
|
|
|
3613
3627
|
}
|
|
3614
3628
|
|
|
3615
3629
|
// src/commands/codex/current.ts
|
|
3616
|
-
|
|
3630
|
+
init_dist2();
|
|
3617
3631
|
import chalk15 from "chalk";
|
|
3618
3632
|
function currentCommand(program2) {
|
|
3619
3633
|
program2.command("current").description("\u663E\u793A\u5F53\u524D\u4F7F\u7528\u7684 Codex \u670D\u52A1\u5546").action(async () => {
|
|
@@ -3644,7 +3658,7 @@ function currentCommand(program2) {
|
|
|
3644
3658
|
}
|
|
3645
3659
|
|
|
3646
3660
|
// src/commands/codex/remove.ts
|
|
3647
|
-
|
|
3661
|
+
init_dist2();
|
|
3648
3662
|
import chalk16 from "chalk";
|
|
3649
3663
|
import inquirer10 from "inquirer";
|
|
3650
3664
|
function removeCommand(program2) {
|
|
@@ -3714,7 +3728,7 @@ function removeCommand(program2) {
|
|
|
3714
3728
|
}
|
|
3715
3729
|
|
|
3716
3730
|
// src/commands/codex/edit.ts
|
|
3717
|
-
|
|
3731
|
+
init_dist2();
|
|
3718
3732
|
import chalk17 from "chalk";
|
|
3719
3733
|
import inquirer11 from "inquirer";
|
|
3720
3734
|
function editCommand(program2) {
|
|
@@ -3802,7 +3816,7 @@ function editCommand(program2) {
|
|
|
3802
3816
|
}
|
|
3803
3817
|
|
|
3804
3818
|
// src/commands/codex/clone.ts
|
|
3805
|
-
|
|
3819
|
+
init_dist2();
|
|
3806
3820
|
import chalk18 from "chalk";
|
|
3807
3821
|
import inquirer12 from "inquirer";
|
|
3808
3822
|
function cloneCommand(program2) {
|
|
@@ -3880,7 +3894,7 @@ function createCodexCommands(program2) {
|
|
|
3880
3894
|
}
|
|
3881
3895
|
|
|
3882
3896
|
// src/commands/claude/add.ts
|
|
3883
|
-
|
|
3897
|
+
init_dist2();
|
|
3884
3898
|
import chalk19 from "chalk";
|
|
3885
3899
|
import inquirer13 from "inquirer";
|
|
3886
3900
|
function addCommand2(program2) {
|
|
@@ -4002,7 +4016,7 @@ function addCommand2(program2) {
|
|
|
4002
4016
|
}
|
|
4003
4017
|
|
|
4004
4018
|
// src/commands/claude/list.ts
|
|
4005
|
-
|
|
4019
|
+
init_dist2();
|
|
4006
4020
|
import chalk20 from "chalk";
|
|
4007
4021
|
function listCommand2(program2) {
|
|
4008
4022
|
program2.command("list").alias("ls").description("\u5217\u51FA\u6240\u6709 Claude Code \u670D\u52A1\u5546").action(async () => {
|
|
@@ -4028,7 +4042,7 @@ function listCommand2(program2) {
|
|
|
4028
4042
|
}
|
|
4029
4043
|
|
|
4030
4044
|
// src/commands/claude/use.ts
|
|
4031
|
-
|
|
4045
|
+
init_dist2();
|
|
4032
4046
|
import chalk21 from "chalk";
|
|
4033
4047
|
import inquirer14 from "inquirer";
|
|
4034
4048
|
function useCommand2(program2) {
|
|
@@ -4090,7 +4104,7 @@ function useCommand2(program2) {
|
|
|
4090
4104
|
}
|
|
4091
4105
|
|
|
4092
4106
|
// src/commands/claude/current.ts
|
|
4093
|
-
|
|
4107
|
+
init_dist2();
|
|
4094
4108
|
import chalk22 from "chalk";
|
|
4095
4109
|
function currentCommand2(program2) {
|
|
4096
4110
|
program2.command("current").description("\u663E\u793A\u5F53\u524D\u4F7F\u7528\u7684 Claude Code \u670D\u52A1\u5546").action(async () => {
|
|
@@ -4121,7 +4135,7 @@ function currentCommand2(program2) {
|
|
|
4121
4135
|
}
|
|
4122
4136
|
|
|
4123
4137
|
// src/commands/claude/remove.ts
|
|
4124
|
-
|
|
4138
|
+
init_dist2();
|
|
4125
4139
|
import chalk23 from "chalk";
|
|
4126
4140
|
import inquirer15 from "inquirer";
|
|
4127
4141
|
function removeCommand2(program2) {
|
|
@@ -4191,7 +4205,7 @@ function removeCommand2(program2) {
|
|
|
4191
4205
|
}
|
|
4192
4206
|
|
|
4193
4207
|
// src/commands/claude/edit.ts
|
|
4194
|
-
|
|
4208
|
+
init_dist2();
|
|
4195
4209
|
import chalk24 from "chalk";
|
|
4196
4210
|
import inquirer16 from "inquirer";
|
|
4197
4211
|
function editCommand2(program2) {
|
|
@@ -4279,7 +4293,7 @@ function editCommand2(program2) {
|
|
|
4279
4293
|
}
|
|
4280
4294
|
|
|
4281
4295
|
// src/commands/claude/clone.ts
|
|
4282
|
-
|
|
4296
|
+
init_dist2();
|
|
4283
4297
|
import chalk25 from "chalk";
|
|
4284
4298
|
import inquirer17 from "inquirer";
|
|
4285
4299
|
function cloneCommand2(program2) {
|
|
@@ -4346,7 +4360,7 @@ function cloneCommand2(program2) {
|
|
|
4346
4360
|
}
|
|
4347
4361
|
|
|
4348
4362
|
// src/commands/clean.ts
|
|
4349
|
-
|
|
4363
|
+
init_dist2();
|
|
4350
4364
|
import chalk26 from "chalk";
|
|
4351
4365
|
import inquirer18 from "inquirer";
|
|
4352
4366
|
function formatBytes2(bytes) {
|
|
@@ -4563,7 +4577,7 @@ function createClaudeCommands(program2) {
|
|
|
4563
4577
|
}
|
|
4564
4578
|
|
|
4565
4579
|
// src/commands/mcp/add.ts
|
|
4566
|
-
|
|
4580
|
+
init_dist2();
|
|
4567
4581
|
import chalk27 from "chalk";
|
|
4568
4582
|
import inquirer19 from "inquirer";
|
|
4569
4583
|
function addCommand3(program2) {
|
|
@@ -4724,7 +4738,7 @@ function addCommand3(program2) {
|
|
|
4724
4738
|
}
|
|
4725
4739
|
|
|
4726
4740
|
// src/commands/mcp/list.ts
|
|
4727
|
-
|
|
4741
|
+
init_dist2();
|
|
4728
4742
|
import chalk28 from "chalk";
|
|
4729
4743
|
function listCommand3(program2) {
|
|
4730
4744
|
program2.command("list").alias("ls").description("\u5217\u51FA\u6240\u6709 MCP \u670D\u52A1\u5668").action(async () => {
|
|
@@ -4770,7 +4784,7 @@ function listCommand3(program2) {
|
|
|
4770
4784
|
}
|
|
4771
4785
|
|
|
4772
4786
|
// src/commands/mcp/remove.ts
|
|
4773
|
-
|
|
4787
|
+
init_dist2();
|
|
4774
4788
|
import chalk29 from "chalk";
|
|
4775
4789
|
import inquirer20 from "inquirer";
|
|
4776
4790
|
function removeCommand3(program2) {
|
|
@@ -4845,7 +4859,7 @@ function removeCommand3(program2) {
|
|
|
4845
4859
|
}
|
|
4846
4860
|
|
|
4847
4861
|
// src/commands/mcp/edit.ts
|
|
4848
|
-
|
|
4862
|
+
init_dist2();
|
|
4849
4863
|
import chalk30 from "chalk";
|
|
4850
4864
|
import inquirer21 from "inquirer";
|
|
4851
4865
|
function editCommand3(program2) {
|
|
@@ -4964,7 +4978,7 @@ function createMCPCommands(program2) {
|
|
|
4964
4978
|
}
|
|
4965
4979
|
|
|
4966
4980
|
// src/commands/gemini/add.ts
|
|
4967
|
-
|
|
4981
|
+
init_dist2();
|
|
4968
4982
|
import chalk31 from "chalk";
|
|
4969
4983
|
import inquirer22 from "inquirer";
|
|
4970
4984
|
function addCommand4(program2) {
|
|
@@ -5083,7 +5097,7 @@ function addCommand4(program2) {
|
|
|
5083
5097
|
}
|
|
5084
5098
|
|
|
5085
5099
|
// src/commands/gemini/list.ts
|
|
5086
|
-
|
|
5100
|
+
init_dist2();
|
|
5087
5101
|
import chalk32 from "chalk";
|
|
5088
5102
|
function listCommand4(program2) {
|
|
5089
5103
|
program2.command("list").alias("ls").description("\u5217\u51FA\u6240\u6709 Gemini CLI \u670D\u52A1\u5546").action(async () => {
|
|
@@ -5109,7 +5123,7 @@ function listCommand4(program2) {
|
|
|
5109
5123
|
}
|
|
5110
5124
|
|
|
5111
5125
|
// src/commands/gemini/use.ts
|
|
5112
|
-
|
|
5126
|
+
init_dist2();
|
|
5113
5127
|
import chalk33 from "chalk";
|
|
5114
5128
|
import inquirer23 from "inquirer";
|
|
5115
5129
|
function useCommand3(program2) {
|
|
@@ -5172,7 +5186,7 @@ function useCommand3(program2) {
|
|
|
5172
5186
|
}
|
|
5173
5187
|
|
|
5174
5188
|
// src/commands/gemini/current.ts
|
|
5175
|
-
|
|
5189
|
+
init_dist2();
|
|
5176
5190
|
import chalk34 from "chalk";
|
|
5177
5191
|
function currentCommand3(program2) {
|
|
5178
5192
|
program2.command("current").description("\u663E\u793A\u5F53\u524D Gemini CLI \u670D\u52A1\u5546").action(async () => {
|
|
@@ -5198,7 +5212,7 @@ function currentCommand3(program2) {
|
|
|
5198
5212
|
}
|
|
5199
5213
|
|
|
5200
5214
|
// src/commands/gemini/remove.ts
|
|
5201
|
-
|
|
5215
|
+
init_dist2();
|
|
5202
5216
|
import chalk35 from "chalk";
|
|
5203
5217
|
import inquirer24 from "inquirer";
|
|
5204
5218
|
function removeCommand4(program2) {
|
|
@@ -5263,7 +5277,7 @@ function removeCommand4(program2) {
|
|
|
5263
5277
|
}
|
|
5264
5278
|
|
|
5265
5279
|
// src/commands/gemini/edit.ts
|
|
5266
|
-
|
|
5280
|
+
init_dist2();
|
|
5267
5281
|
import chalk36 from "chalk";
|
|
5268
5282
|
import inquirer25 from "inquirer";
|
|
5269
5283
|
function editCommand4(program2) {
|
|
@@ -5324,7 +5338,7 @@ function editCommand4(program2) {
|
|
|
5324
5338
|
}
|
|
5325
5339
|
|
|
5326
5340
|
// src/commands/gemini/clone.ts
|
|
5327
|
-
|
|
5341
|
+
init_dist2();
|
|
5328
5342
|
import chalk37 from "chalk";
|
|
5329
5343
|
import inquirer26 from "inquirer";
|
|
5330
5344
|
function cloneCommand3(program2) {
|
|
@@ -5403,7 +5417,7 @@ function createGeminiCommands(program2) {
|
|
|
5403
5417
|
init_sync();
|
|
5404
5418
|
|
|
5405
5419
|
// src/commands/export.ts
|
|
5406
|
-
|
|
5420
|
+
init_dist2();
|
|
5407
5421
|
import chalk38 from "chalk";
|
|
5408
5422
|
import path10 from "path";
|
|
5409
5423
|
function exportCommand(program2) {
|
|
@@ -5445,7 +5459,7 @@ function exportCommand(program2) {
|
|
|
5445
5459
|
}
|
|
5446
5460
|
|
|
5447
5461
|
// src/commands/import.ts
|
|
5448
|
-
|
|
5462
|
+
init_dist2();
|
|
5449
5463
|
import chalk39 from "chalk";
|
|
5450
5464
|
import inquirer27 from "inquirer";
|
|
5451
5465
|
import path11 from "path";
|
|
@@ -5527,7 +5541,7 @@ function importCommand(program2) {
|
|
|
5527
5541
|
}
|
|
5528
5542
|
|
|
5529
5543
|
// src/index.ts
|
|
5530
|
-
|
|
5544
|
+
init_dist2();
|
|
5531
5545
|
if (process.env.NODE_ENV === "development") {
|
|
5532
5546
|
console.log(chalk40.gray("\n[\u5F00\u53D1\u6A21\u5F0F] \u914D\u7F6E\u76EE\u5F55:"));
|
|
5533
5547
|
console.log(chalk40.gray(` ccman: ${getCcmanDir()}`));
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
# 基础设置:通用 Codex 默认配置
|
|
3
3
|
########################################
|
|
4
4
|
|
|
5
|
-
model = "gpt-5.1"
|
|
5
|
+
model = "gpt-5.1-code-max"
|
|
6
6
|
|
|
7
7
|
# model_provider 与 model_providers 由 ccman 根据当前服务商自动写入
|
|
8
8
|
# 如需手动指定可自行在此添加:
|
|
9
9
|
# model_provider = "YourProviderName"
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# 理力度设置
|
|
12
12
|
model_reasoning_effort = "high"
|
|
13
13
|
|
|
14
|
-
#
|
|
14
|
+
# 存储策略
|
|
15
15
|
disable_response_storage = true
|
|
16
16
|
|
|
17
17
|
# 沙箱模式
|
|
18
|
-
sandbox_mode = "
|
|
18
|
+
sandbox_mode = "danger-full-access" # 完全禁用沙箱
|
|
19
|
+
# sandbox_mode = "workspace-write"
|
|
19
20
|
windows_wsl_setup_acknowledged = true
|
|
20
21
|
|
|
21
22
|
# 命令审批策略(只影响本地行为,不会影响上游服务商)
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccman",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "Manage Codex
|
|
5
|
+
"description": "Manage Codex, Claude Code, Gemini CLI, and MCP API service provider configurations",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"bin": {
|
|
8
8
|
"ccman": "./dist/index.js"
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
"codex",
|
|
16
16
|
"claude",
|
|
17
17
|
"claude-code",
|
|
18
|
+
"gemini",
|
|
19
|
+
"gemini-cli",
|
|
20
|
+
"mcp",
|
|
21
|
+
"model-context-protocol",
|
|
18
22
|
"ai",
|
|
19
23
|
"api",
|
|
20
24
|
"config",
|