ccconfig 1.4.0 → 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.
- package/README.md +76 -26
- package/README_zh.md +77 -26
- package/ccconfig.js +77 -4
- package/package.json +1 -1
- package//345/260/217/347/272/242/344/271/246/346/226/207/347/253/240_KAT-Coder.md +0 -177
- package//345/260/217/347/272/242/344/271/246/346/226/207/347/253/240_KAT-Coder_/347/237/255/347/211/210.md +0 -120
- package//345/260/217/347/272/242/344/271/246/346/226/207/347/253/240_KAT-Coder_/350/266/205/347/237/255/347/211/210.txt +0 -31
package/README.md
CHANGED
|
@@ -2,15 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | [中文](README_zh.md)
|
|
4
4
|
|
|
5
|
-
Quickly switch between different claude-code providers
|
|
5
|
+
Quickly switch between different claude-code providers and start Claude Code with specific profiles.
|
|
6
6
|
|
|
7
|
+
**Recommended Usage (Easiest):**
|
|
7
8
|
|
|
8
9
|
```bash
|
|
9
|
-
#
|
|
10
|
-
ccconfig
|
|
10
|
+
# Add configurations
|
|
11
|
+
ccconfig add work
|
|
12
|
+
ccconfig add personal
|
|
13
|
+
|
|
14
|
+
# Start Claude Code directly with a specific profile
|
|
15
|
+
ccconfig start work # During work hours
|
|
16
|
+
ccconfig start personal # After work
|
|
17
|
+
|
|
18
|
+
# Or use safe mode (requires confirmation for each command)
|
|
19
|
+
ccconfig safe-start work
|
|
20
|
+
```
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
**Alternative: Manual Switch Mode:**
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Switch configuration in current shell
|
|
26
|
+
ccconfig use company
|
|
14
27
|
|
|
15
28
|
# Permanently write to shell config (no need to eval or source each time)
|
|
16
29
|
ccconfig use personal --permanent # or use -p for short
|
|
@@ -25,31 +38,66 @@ ccconfig use personal --permanent # or use -p for short
|
|
|
25
38
|
npm install -g ccconfig
|
|
26
39
|
```
|
|
27
40
|
|
|
28
|
-
###
|
|
41
|
+
### Method 1: Direct Start Mode (Recommended)
|
|
29
42
|
|
|
30
|
-
|
|
31
|
-
# 1. Configure Shell auto-loading (see below)
|
|
43
|
+
The easiest way to use ccconfig - directly start Claude Code with a specific profile:
|
|
32
44
|
|
|
33
|
-
|
|
34
|
-
|
|
45
|
+
```bash
|
|
46
|
+
# 1. Add a configuration (interactive mode)
|
|
47
|
+
ccconfig add work
|
|
35
48
|
# Follow the prompts to enter:
|
|
36
|
-
# - Name
|
|
37
49
|
# - ANTHROPIC_BASE_URL
|
|
38
|
-
# - ANTHROPIC_AUTH_TOKEN
|
|
39
|
-
# - ANTHROPIC_API_KEY
|
|
50
|
+
# - ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY
|
|
40
51
|
# - ANTHROPIC_MODEL (optional)
|
|
41
52
|
# - ANTHROPIC_SMALL_FAST_MODEL (optional)
|
|
42
53
|
|
|
43
|
-
#
|
|
54
|
+
# 2. Start Claude Code directly with your profile
|
|
55
|
+
ccconfig start work # Auto-approve mode (adds --dangerously-skip-permissions)
|
|
56
|
+
# or
|
|
57
|
+
ccconfig safe-start work # Safe mode (requires confirmation for each command)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**That's it!** Claude Code starts with your configuration automatically injected.
|
|
61
|
+
|
|
62
|
+
**Two modes explained:**
|
|
63
|
+
|
|
64
|
+
- **`ccconfig start`** - Auto-approve mode
|
|
65
|
+
- Automatically adds `--dangerously-skip-permissions` flag
|
|
66
|
+
- Commands execute without confirmation prompts
|
|
67
|
+
- **Only use with profiles you trust**
|
|
68
|
+
- Perfect for: personal projects, trusted company profiles, rapid development
|
|
69
|
+
|
|
70
|
+
- **`ccconfig safe-start`** - Safe mode
|
|
71
|
+
- Does NOT add `--dangerously-skip-permissions`
|
|
72
|
+
- Requires manual confirmation before executing each command
|
|
73
|
+
- **Recommended for production or untrusted environments**
|
|
74
|
+
- Perfect for: production systems, new profiles, sensitive data
|
|
75
|
+
|
|
76
|
+
**Advantages:**
|
|
77
|
+
- No shell configuration needed
|
|
78
|
+
- No manual switching required
|
|
79
|
+
- Environment variables automatically injected
|
|
80
|
+
- Works across all shells
|
|
81
|
+
- Pass additional arguments: `ccconfig start work /path/to/project --verbose`
|
|
82
|
+
|
|
83
|
+
### Method 2: Manual Switch Mode
|
|
84
|
+
|
|
85
|
+
If you prefer to manually switch configurations and start Claude Code separately:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# 1. Add configuration (interactive mode)
|
|
89
|
+
ccconfig add work
|
|
90
|
+
|
|
91
|
+
# 2. Switch configuration
|
|
44
92
|
ccconfig use work
|
|
45
93
|
|
|
46
|
-
#
|
|
47
|
-
|
|
48
|
-
|
|
94
|
+
# 3. Apply to current shell (choose one):
|
|
95
|
+
eval $(ccconfig env bash) # Bash/Zsh - temporary
|
|
96
|
+
ccconfig env fish | source # Fish - temporary
|
|
97
|
+
ccconfig use work --permanent # Write to shell config - permanent
|
|
49
98
|
|
|
50
|
-
#
|
|
51
|
-
|
|
52
|
-
# Automatically detects and modifies ~/.bashrc, ~/.zshrc, or config.fish
|
|
99
|
+
# 4. Start Claude Code manually
|
|
100
|
+
claude
|
|
53
101
|
```
|
|
54
102
|
|
|
55
103
|
### Settings Mode
|
|
@@ -212,18 +260,20 @@ Do you want to set ANTHROPIC_SMALL_FAST_MODEL? (y/N) [n]:
|
|
|
212
260
|
✓ Configuration 'work' updated
|
|
213
261
|
```
|
|
214
262
|
|
|
215
|
-
**Note:** After updating a configuration,
|
|
263
|
+
**Note:** After updating a configuration, you can either:
|
|
264
|
+
- Use `ccconfig start work` to launch Claude Code with the updated profile
|
|
265
|
+
- Or use `ccconfig use work` to activate it in current shell
|
|
216
266
|
|
|
217
267
|
### Shell Completion
|
|
218
268
|
|
|
219
269
|
ccconfig supports shell completion for commands, profile names, and options. This makes it easier to discover and use commands.
|
|
220
270
|
|
|
221
271
|
**Features:**
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
-
|
|
225
|
-
-
|
|
226
|
-
-
|
|
272
|
+
- Command completion (list, add, update, use, remove, etc.)
|
|
273
|
+
- Profile name completion (dynamically reads from your configurations)
|
|
274
|
+
- Option completion (--permanent, --show-secret, etc.)
|
|
275
|
+
- Mode completion (settings, env)
|
|
276
|
+
- Format completion (bash, zsh, fish, etc.)
|
|
227
277
|
|
|
228
278
|
**Installation:**
|
|
229
279
|
|
package/README_zh.md
CHANGED
|
@@ -2,14 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | [中文](README_zh.md)
|
|
4
4
|
|
|
5
|
-
快速切换不同的 claude-code
|
|
5
|
+
快速切换不同的 claude-code 提供商配置,并使用指定配置启动 Claude Code。
|
|
6
|
+
|
|
7
|
+
**推荐用法(最简单):**
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
#
|
|
9
|
-
ccconfig
|
|
10
|
+
# 添加配置
|
|
11
|
+
ccconfig add work
|
|
12
|
+
ccconfig add personal
|
|
10
13
|
|
|
11
|
-
#
|
|
12
|
-
ccconfig
|
|
14
|
+
# 直接使用指定配置启动 Claude Code
|
|
15
|
+
ccconfig start work # 工作时间
|
|
16
|
+
ccconfig start personal # 下班后
|
|
17
|
+
|
|
18
|
+
# 或使用安全模式(每个命令都需要确认)
|
|
19
|
+
ccconfig safe-start work
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**备选方案:手动切换模式:**
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# 在当前 shell 中切换配置
|
|
26
|
+
ccconfig use company
|
|
13
27
|
|
|
14
28
|
# 永久写入 shell 配置文件(无需每次 eval 或 source)
|
|
15
29
|
ccconfig use personal --permanent # 或使用 -p 简写
|
|
@@ -24,31 +38,66 @@ ccconfig use personal --permanent # 或使用 -p 简写
|
|
|
24
38
|
npm install -g ccconfig
|
|
25
39
|
```
|
|
26
40
|
|
|
27
|
-
###
|
|
41
|
+
### 方式 1:直接启动模式(推荐)
|
|
28
42
|
|
|
29
|
-
|
|
30
|
-
# 1. 配置 Shell 自动加载(见下文)
|
|
43
|
+
最简单的使用方式 - 直接使用指定配置启动 Claude Code:
|
|
31
44
|
|
|
32
|
-
|
|
33
|
-
|
|
45
|
+
```bash
|
|
46
|
+
# 1. 添加配置(交互模式)
|
|
47
|
+
ccconfig add work
|
|
34
48
|
# 按提示输入:
|
|
35
|
-
# - 名称
|
|
36
49
|
# - ANTHROPIC_BASE_URL
|
|
37
|
-
# - ANTHROPIC_AUTH_TOKEN
|
|
38
|
-
# - ANTHROPIC_API_KEY
|
|
50
|
+
# - ANTHROPIC_AUTH_TOKEN 或 ANTHROPIC_API_KEY
|
|
39
51
|
# - ANTHROPIC_MODEL(可选)
|
|
40
52
|
# - ANTHROPIC_SMALL_FAST_MODEL(可选)
|
|
41
53
|
|
|
42
|
-
#
|
|
54
|
+
# 2. 直接使用配置启动 Claude Code
|
|
55
|
+
ccconfig start work # 自动批准模式(添加 --dangerously-skip-permissions)
|
|
56
|
+
# 或
|
|
57
|
+
ccconfig safe-start work # 安全模式(每个命令需要确认)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**就这么简单!** Claude Code 会自动注入您的配置启动。
|
|
61
|
+
|
|
62
|
+
**两种模式说明:**
|
|
63
|
+
|
|
64
|
+
- **`ccconfig start`** - 自动批准模式
|
|
65
|
+
- 自动添加 `--dangerously-skip-permissions` 标志
|
|
66
|
+
- 命令无需确认直接执行
|
|
67
|
+
- **仅在您信任的配置中使用**
|
|
68
|
+
- 适用场景:个人项目、可信的公司配置、快速开发
|
|
69
|
+
|
|
70
|
+
- **`ccconfig safe-start`** - 安全模式
|
|
71
|
+
- 不添加 `--dangerously-skip-permissions`
|
|
72
|
+
- 执行每个命令前需要手动确认
|
|
73
|
+
- **推荐用于生产环境或不可信环境**
|
|
74
|
+
- 适用场景:生产系统、新配置、敏感数据
|
|
75
|
+
|
|
76
|
+
**优势:**
|
|
77
|
+
- 无需配置 shell
|
|
78
|
+
- 无需手动切换
|
|
79
|
+
- 自动注入环境变量
|
|
80
|
+
- 支持所有 shell
|
|
81
|
+
- 可传递额外参数:`ccconfig start work /path/to/project --verbose`
|
|
82
|
+
|
|
83
|
+
### 方式 2:手动切换模式
|
|
84
|
+
|
|
85
|
+
如果您更喜欢手动切换配置,然后单独启动 Claude Code:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# 1. 添加配置(交互模式)
|
|
89
|
+
ccconfig add work
|
|
90
|
+
|
|
91
|
+
# 2. 切换配置
|
|
43
92
|
ccconfig use work
|
|
44
93
|
|
|
45
|
-
#
|
|
46
|
-
#
|
|
47
|
-
|
|
94
|
+
# 3. 应用到当前 shell(选择一种):
|
|
95
|
+
eval $(ccconfig env bash) # Bash/Zsh - 临时生效
|
|
96
|
+
ccconfig env fish | source # Fish - 临时生效
|
|
97
|
+
ccconfig use work --permanent # 写入 shell 配置 - 永久生效
|
|
48
98
|
|
|
49
|
-
#
|
|
50
|
-
|
|
51
|
-
# 自动检测并修改 ~/.bashrc、~/.zshrc 或 config.fish
|
|
99
|
+
# 4. 手动启动 Claude Code
|
|
100
|
+
claude
|
|
52
101
|
```
|
|
53
102
|
|
|
54
103
|
### Settings 模式
|
|
@@ -211,18 +260,20 @@ Do you want to set ANTHROPIC_SMALL_FAST_MODEL? (y/N) [n]:
|
|
|
211
260
|
✓ Configuration 'work' updated
|
|
212
261
|
```
|
|
213
262
|
|
|
214
|
-
**注意:**
|
|
263
|
+
**注意:** 更新配置后,您可以:
|
|
264
|
+
- 使用 `ccconfig start work` 以更新后的配置启动 Claude Code
|
|
265
|
+
- 或使用 `ccconfig use work` 在当前 shell 中激活配置
|
|
215
266
|
|
|
216
267
|
### Shell 自动补全
|
|
217
268
|
|
|
218
269
|
ccconfig 支持命令、配置名称和选项的 shell 自动补全,让您更容易发现和使用命令。
|
|
219
270
|
|
|
220
271
|
**功能:**
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
-
|
|
225
|
-
-
|
|
272
|
+
- 命令补全 (list, add, update, use, remove 等)
|
|
273
|
+
- 配置名称补全(动态读取您的配置)
|
|
274
|
+
- 选项补全 (--permanent, --show-secret 等)
|
|
275
|
+
- 模式补全 (settings, env)
|
|
276
|
+
- 格式补全 (bash, zsh, fish 等)
|
|
226
277
|
|
|
227
278
|
**安装:**
|
|
228
279
|
|
package/ccconfig.js
CHANGED
|
@@ -1420,7 +1420,10 @@ function startClaude(name, extraArgs = [], options = {}) {
|
|
|
1420
1420
|
// Normalize all profile env values to strings (spawn requires string values)
|
|
1421
1421
|
const normalizedEnv = {};
|
|
1422
1422
|
for (const [key, value] of Object.entries(profile.env)) {
|
|
1423
|
-
|
|
1423
|
+
if (value === undefined || value === null) {
|
|
1424
|
+
continue;
|
|
1425
|
+
}
|
|
1426
|
+
normalizedEnv[key] = typeof value === 'string' ? value : String(value);
|
|
1424
1427
|
}
|
|
1425
1428
|
const envVars = {...process.env, ...normalizedEnv};
|
|
1426
1429
|
|
|
@@ -1430,21 +1433,91 @@ function startClaude(name, extraArgs = [], options = {}) {
|
|
|
1430
1433
|
stdio: 'inherit' // Inherit stdin, stdout, stderr from parent process
|
|
1431
1434
|
});
|
|
1432
1435
|
|
|
1436
|
+
// Function to restore terminal state and exit
|
|
1437
|
+
const exitGracefully = (code) => {
|
|
1438
|
+
// Reset terminal to normal mode (in case it was left in raw mode)
|
|
1439
|
+
if (process.stdin.isTTY && process.stdin.setRawMode) {
|
|
1440
|
+
try {
|
|
1441
|
+
process.stdin.setRawMode(false);
|
|
1442
|
+
} catch (e) {
|
|
1443
|
+
// Ignore errors during cleanup
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
const canResetTerminal = process.platform !== 'win32' && process.stdin.isTTY && process.stdout.isTTY;
|
|
1448
|
+
|
|
1449
|
+
// Use stty to restore terminal settings on Unix-like systems
|
|
1450
|
+
// This is more comprehensive than just setRawMode
|
|
1451
|
+
if (canResetTerminal) {
|
|
1452
|
+
try {
|
|
1453
|
+
// 'stty sane' restores terminal to sensible settings
|
|
1454
|
+
// Use stdio: 'inherit' to ensure it operates on the same terminal
|
|
1455
|
+
execSync('stty sane', { stdio: 'inherit' });
|
|
1456
|
+
} catch (e) {
|
|
1457
|
+
// If stty fails, try basic echo and icanon reset
|
|
1458
|
+
try {
|
|
1459
|
+
execSync('stty echo icanon', { stdio: 'inherit' });
|
|
1460
|
+
} catch (e2) {
|
|
1461
|
+
try {
|
|
1462
|
+
execSync('stty echo', { stdio: 'inherit' });
|
|
1463
|
+
execSync('stty icanon', { stdio: 'inherit' });
|
|
1464
|
+
} catch (e3) {
|
|
1465
|
+
// Ignore - best effort
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
process.exit(code || 0);
|
|
1472
|
+
};
|
|
1473
|
+
|
|
1474
|
+
// Handle SIGINT (Ctrl+C) and SIGTERM
|
|
1475
|
+
const signalHandler = (signal) => {
|
|
1476
|
+
// Forward signal to child process
|
|
1477
|
+
if (claude && !claude.killed) {
|
|
1478
|
+
claude.kill(signal);
|
|
1479
|
+
}
|
|
1480
|
+
// Don't exit immediately - wait for child to exit
|
|
1481
|
+
};
|
|
1482
|
+
|
|
1483
|
+
process.on('SIGINT', signalHandler);
|
|
1484
|
+
process.on('SIGTERM', signalHandler);
|
|
1485
|
+
|
|
1433
1486
|
// Handle process exit
|
|
1434
1487
|
claude.on('close', (code) => {
|
|
1488
|
+
// Remove signal handlers to avoid duplicate handling
|
|
1489
|
+
process.removeListener('SIGINT', signalHandler);
|
|
1490
|
+
process.removeListener('SIGTERM', signalHandler);
|
|
1491
|
+
|
|
1492
|
+
// Show project promotion message on exit
|
|
1493
|
+
console.log('');
|
|
1494
|
+
console.log('──────────────────────────────────────────');
|
|
1495
|
+
console.log('Thanks for using ccconfig!');
|
|
1496
|
+
console.log('');
|
|
1497
|
+
console.log('If you find this tool helpful, please consider:');
|
|
1498
|
+
console.log(' ⭐ Star us on GitHub: https://github.com/Danielmelody/ccconfig');
|
|
1499
|
+
console.log(' 📢 Share with others who use Claude Code');
|
|
1500
|
+
console.log('──────────────────────────────────────────');
|
|
1501
|
+
console.log('');
|
|
1502
|
+
|
|
1435
1503
|
if (code !== 0 && code !== null) {
|
|
1436
1504
|
console.error(`Claude Code exited with code ${code}`);
|
|
1437
|
-
|
|
1505
|
+
exitGracefully(code);
|
|
1506
|
+
} else {
|
|
1507
|
+
exitGracefully(0);
|
|
1438
1508
|
}
|
|
1439
|
-
process.exit(0);
|
|
1440
1509
|
});
|
|
1441
1510
|
|
|
1442
1511
|
claude.on('error', (err) => {
|
|
1512
|
+
// Remove signal handlers
|
|
1513
|
+
process.removeListener('SIGINT', signalHandler);
|
|
1514
|
+
process.removeListener('SIGTERM', signalHandler);
|
|
1515
|
+
|
|
1443
1516
|
console.error(`Error starting Claude Code: ${err.message}`);
|
|
1444
1517
|
console.error('');
|
|
1445
1518
|
console.error('Please make sure Claude Code CLI is installed:');
|
|
1446
1519
|
console.error(' npm install -g claude-code');
|
|
1447
|
-
|
|
1520
|
+
exitGracefully(1);
|
|
1448
1521
|
});
|
|
1449
1522
|
}
|
|
1450
1523
|
|
package/package.json
CHANGED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
# 在 Claude Code 里用 KAT-Coder!一条命令直接启动
|
|
2
|
-
|
|
3
|
-
## 一条命令,让 Claude Code 用上国产高性能模型
|
|
4
|
-
|
|
5
|
-
快手 KAT-Coder 完全**兼容 Claude Code**,**Pro 版在 SWE-Bench Verified 中达到 73.4%**,**超越 GPT-5 (72.8%) 和 Claude Sonnet 4 (72.7%)**,性能接近顶级模型。**新用户送 2000 万 Token**(约 4000 次对话),性价比极高。Air 版永久免费适合简单任务,两者配合使用大幅降低成本。
|
|
6
|
-
|
|
7
|
-
使用 **ccconfig** 工具(GitHub 搜索"Danielmelody/ccconfig"),配置一次后,每次只需**一条命令**即可直接启动:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ccconfig start kat-coder
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**核心优势**:
|
|
14
|
-
- **Pro 版性能 73.4%**,超越 GPT-5 (72.8%) 和 Claude Sonnet 4 (72.7%),可替代大部分开发场景
|
|
15
|
-
- **新用户送 2000 万 Token**,约 4000 次完整对话,足够长期使用
|
|
16
|
-
- **一条命令直接启动**,ccconfig 管理多配置,Pro/Claude/Air 随时切换
|
|
17
|
-
- **Air 版永久免费**,适合简单任务,进一步降低成本
|
|
18
|
-
- **性价比极高**,性能接近顶级模型,成本大幅降低
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## 性能对比
|
|
23
|
-
|
|
24
|
-
| 模型 | SWE-Bench Verified | 价格 |
|
|
25
|
-
|------|-------------------|------|
|
|
26
|
-
| **GPT-5-Codex** | 74.5% | 付费 |
|
|
27
|
-
| **KAT-Coder-Pro** | 73.4% | 付费 |
|
|
28
|
-
| **GPT-5** | 72.8% | 付费 |
|
|
29
|
-
| **Claude Sonnet 4** | 72.7% | $20/月 |
|
|
30
|
-
| **KAT-Coder-Air** | 轻量版* | **永久免费** |
|
|
31
|
-
|
|
32
|
-
*适合简单任务
|
|
33
|
-
|
|
34
|
-
**KAT-Coder-Pro 在主流编程任务中表现优异,超越 GPT-5 和 Claude Sonnet 4**
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## 快速开始(3 步,5 分钟完成)
|
|
39
|
-
|
|
40
|
-
### 步骤 1:获取端点和密钥
|
|
41
|
-
|
|
42
|
-
访问 **StreamLake 点 AI 平台**(搜索"StreamLake"进入官网)
|
|
43
|
-
|
|
44
|
-
1. 注册并登录
|
|
45
|
-
2. 创建推理端点,选择模型:
|
|
46
|
-
- **Air 版**(永久免费):日常开发
|
|
47
|
-
- **Pro 版**(送 2000 万 Token):高性能需求
|
|
48
|
-
3. 记录 **Endpoint ID**(格式:`ep-xxx-xxx`)
|
|
49
|
-
4. 在"API KEY 管理"创建并保存 **Vanchin API Key**
|
|
50
|
-
|
|
51
|
-
**提示**:建议同时创建 Air 和 Pro 两个端点,用 ccconfig 管理,随时切换
|
|
52
|
-
|
|
53
|
-
### 步骤 2:安装并配置 ccconfig
|
|
54
|
-
|
|
55
|
-
**ccconfig**(GitHub 搜索"Danielmelody/ccconfig")是一个开源配置管理神器,支持多配置一键切换,兼容 Claude Code、Cline、RooCode 等工具。核心亮点是 `ccconfig start <name>` 直接启动,无需手动改环境变量,体验丝滑!
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
# 安装
|
|
59
|
-
npm install -g ccconfig
|
|
60
|
-
|
|
61
|
-
# 添加配置(交互式输入)
|
|
62
|
-
ccconfig add
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
系统会依次提示你输入:
|
|
66
|
-
|
|
67
|
-
1. **配置名称**:`kat-coder`(或 `kat-air`、`kat-pro`)
|
|
68
|
-
|
|
69
|
-
2. **ANTHROPIC_BASE_URL**:
|
|
70
|
-
- 在 StreamLake 点 AI 平台你创建的**推理端点详情页**,找到"Claude Code 配置"或"API 地址"
|
|
71
|
-
- 复制完整的 API URL(自动包含你的 Endpoint ID)
|
|
72
|
-
- 如果找不到,在平台**文档中心**搜索"Claude Code"查看配置说明
|
|
73
|
-
|
|
74
|
-
3. **ANTHROPIC_AUTH_TOKEN**:粘贴你的 Vanchin API Key
|
|
75
|
-
4. **ANTHROPIC_API_KEY**:直接按回车跳过
|
|
76
|
-
5. **ANTHROPIC_MODEL**:`KAT-Coder`
|
|
77
|
-
6. **ANTHROPIC_SMALL_FAST_MODEL**:输入 `KAT-Coder`
|
|
78
|
-
|
|
79
|
-
如果你有多个配置(Air 和 Pro),重复以上步骤添加第二个配置。
|
|
80
|
-
|
|
81
|
-
### 步骤 3:一条命令启动
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
# 使用 KAT-Coder 启动 Claude Code
|
|
85
|
-
ccconfig start kat-coder
|
|
86
|
-
|
|
87
|
-
# 或切换到其他配置
|
|
88
|
-
ccconfig start kat-pro # 使用 Pro 版
|
|
89
|
-
ccconfig start claude # 切换回官方 Claude
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
**工作原理**:
|
|
93
|
-
- `ccconfig start` 会自动加载指定配置的环境变量
|
|
94
|
-
- 直接启动 Claude Code,无需修改 shell 配置
|
|
95
|
-
- 无需重新加载配置文件或重启终端
|
|
96
|
-
- 自动添加 `--dangerously-skip-permissions` 标志以便快速开发
|
|
97
|
-
|
|
98
|
-
**安全提示**:`start` 命令会自动批准命令执行,仅用于可信配置。如需手动确认每条命令,使用 `ccconfig safe-start kat-coder`
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## 多配置管理
|
|
103
|
-
|
|
104
|
-
ccconfig 的核心优势是**多配置随时切换**:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
# 查看所有配置
|
|
108
|
-
ccconfig list
|
|
109
|
-
|
|
110
|
-
# 切换配置只需改命令中的名称
|
|
111
|
-
ccconfig start kat-air # 日常开发用免费版
|
|
112
|
-
ccconfig start kat-pro # 复杂任务用 Pro 版
|
|
113
|
-
ccconfig start claude # 需要时切换回官方 Claude
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**推荐配置**:
|
|
117
|
-
- `kat-pro`:**KAT-Coder Pro 版(主力推荐)**,性能 73.4% 超越 GPT-5 和 Claude Sonnet 4,送 2000 万 Token 量大管饱
|
|
118
|
-
- `claude`:官方 Claude(极致性能),特殊复杂场景
|
|
119
|
-
- `kat-air`:KAT-Coder Air 版(永久免费),简单任务补充
|
|
120
|
-
|
|
121
|
-
**最佳实践**:日常开发用 Pro(性价比高,性能超越 GPT-5),遇到特别复杂的架构问题切换到顶级模型
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
## 使用场景
|
|
126
|
-
|
|
127
|
-
**KAT-Coder Pro(主力推荐)**:
|
|
128
|
-
- 日常 CRUD、Bug 修复、代码重构
|
|
129
|
-
- 功能开发、业务逻辑实现
|
|
130
|
-
- Vibe Coding 快速原型开发
|
|
131
|
-
- 代码审查、优化建议
|
|
132
|
-
- **性能 73.4%,送 2000 万 Token 量大管饱,性价比高**
|
|
133
|
-
|
|
134
|
-
**Claude(顶级性能)**:
|
|
135
|
-
- 复杂架构设计、技术方案选型
|
|
136
|
-
- 核心算法、性能关键代码
|
|
137
|
-
- 企业级关键项目
|
|
138
|
-
|
|
139
|
-
**KAT-Coder Air(免费补充)**:
|
|
140
|
-
- 简单的变量命名、注释生成
|
|
141
|
-
- 学习实验、测试验证
|
|
142
|
-
|
|
143
|
-
**推荐搭配**:Pro 作为主力(量大管饱放心用),遇到特别复杂的架构问题切换到 Claude,用 ccconfig 一键切换
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
## 常见问题
|
|
148
|
-
|
|
149
|
-
**Q:为什么推荐 `ccconfig start` 而不是 `ccconfig use`?**
|
|
150
|
-
|
|
151
|
-
A:`start` 命令更简单,一条命令直接启动,无需修改 shell 配置;`use --permanent` 适合固定使用某个配置的用户。
|
|
152
|
-
|
|
153
|
-
**Q:Air 版和 Pro 版有什么区别?**
|
|
154
|
-
|
|
155
|
-
A:Air 版永久免费(轻量版,适合简单任务),Pro 版性能更强(73.4%)+ 新用户送 2000 万 Token(约 4000 次对话)。
|
|
156
|
-
|
|
157
|
-
**Q:如何在 Air 和 Pro 间切换?**
|
|
158
|
-
|
|
159
|
-
A:添加两个配置后,用 `ccconfig start kat-air` 或 `ccconfig start kat-pro` 切换即可。
|
|
160
|
-
|
|
161
|
-
**Q:`--dangerously-skip-permissions` 安全吗?**
|
|
162
|
-
|
|
163
|
-
A:此标志会自动批准命令执行,仅用于可信配置。如需手动确认,使用 `ccconfig safe-start` 命令。
|
|
164
|
-
|
|
165
|
-
---
|
|
166
|
-
|
|
167
|
-
## 支持开源
|
|
168
|
-
|
|
169
|
-
如果 ccconfig 帮到了你,不妨去 **GitHub 搜索"Danielmelody/ccconfig"** 给作者点个 **⭐ Star**!
|
|
170
|
-
|
|
171
|
-
这个项目完全开源免费(MIT 协议),作者持续在维护和更新功能。一个 Star 是对开源作者最好的鼓励,也能让更多人发现这个好用的工具。开源不易,感谢作者的贡献!🙏
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
**标签**:#ClaudeCode #KAT-Coder #AI编程 #免费AI #ccconfig #国产平替 #编程效率 #VibeCoding #开源工具
|
|
176
|
-
|
|
177
|
-
**一句话总结**:用 ccconfig 在 Claude Code 中配置 KAT-Coder,`ccconfig start kat-coder` 一条命令启动,Pro 版性能 73.4% 超越 GPT-5 和 Claude Sonnet 4 + 送 2000 万 Token 量大管饱性价比高,覆盖大部分开发场景。
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# 在 Claude Code 里用 KAT-Coder!一条命令直接启动
|
|
2
|
-
|
|
3
|
-
## 一条命令,让 Claude Code 用上国产高性能模型
|
|
4
|
-
|
|
5
|
-
快手 KAT-Coder 完全**兼容 Claude Code**,**Pro 版在 SWE-Bench Verified 中达到 73.4%**,**超越 GPT-5 (72.8%) 和 Claude Sonnet 4 (72.7%)**。**新用户送 2000 万 Token** 量大管饱性价比高,Air 版永久免费补充。
|
|
6
|
-
|
|
7
|
-
使用 **ccconfig** 工具(GitHub 搜索"Danielmelody/ccconfig"),配置一次后,每次只需**一条命令**即可直接启动:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ccconfig start kat-coder
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
**核心优势**:
|
|
14
|
-
- **Pro 版性能 73.4%**,超越 GPT-5 和 Claude Sonnet 4,可替代大部分开发场景
|
|
15
|
-
- **送 2000 万 Token 量大管饱**,约 4000 次对话,性价比高
|
|
16
|
-
- **一条命令启动切换**,Pro/Claude/Air 随时切换
|
|
17
|
-
- **Air 版永久免费**,简单任务补充
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## 快速开始(3 步)
|
|
22
|
-
|
|
23
|
-
### 步骤 1:获取端点和密钥
|
|
24
|
-
|
|
25
|
-
访问 **StreamLake 点 AI 平台**(搜索"StreamLake"进入官网),注册后创建推理端点:
|
|
26
|
-
- **Air 版**(永久免费):日常开发
|
|
27
|
-
- **Pro 版**(送 2000 万 Token):高性能需求
|
|
28
|
-
|
|
29
|
-
记录 **Endpoint ID**(格式:`ep-xxx-xxx`)和 **Vanchin API Key**
|
|
30
|
-
|
|
31
|
-
### 步骤 2:安装并配置 ccconfig
|
|
32
|
-
|
|
33
|
-
**ccconfig**(GitHub 搜索"Danielmelody/ccconfig")是一个开源配置管理神器,支持多配置一键切换,兼容 Claude Code、Cline、RooCode 等工具。
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
# 安装
|
|
37
|
-
npm install -g ccconfig
|
|
38
|
-
|
|
39
|
-
# 添加配置(交互式)
|
|
40
|
-
ccconfig add
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
按提示输入:
|
|
44
|
-
1. **配置名称**:`kat-coder`
|
|
45
|
-
2. **ANTHROPIC_BASE_URL**:在 StreamLake 点 AI 平台的**推理端点详情页**找到 API 地址并复制(或在文档中心搜索"Claude Code"查看配置)
|
|
46
|
-
3. **ANTHROPIC_AUTH_TOKEN**:粘贴你的 Vanchin API Key
|
|
47
|
-
4. **ANTHROPIC_API_KEY**:按回车跳过
|
|
48
|
-
5. **ANTHROPIC_MODEL**:`KAT-Coder`
|
|
49
|
-
6. **ANTHROPIC_SMALL_FAST_MODEL**:`KAT-Coder`
|
|
50
|
-
|
|
51
|
-
### 步骤 3:一条命令启动
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
# 使用 KAT-Coder 启动
|
|
55
|
-
ccconfig start kat-coder
|
|
56
|
-
|
|
57
|
-
# 切换配置只需改名称
|
|
58
|
-
ccconfig start kat-air # 免费版
|
|
59
|
-
ccconfig start kat-pro # Pro 版
|
|
60
|
-
ccconfig start claude # 官方 Claude
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## 多配置管理
|
|
66
|
-
|
|
67
|
-
ccconfig 的核心优势是**多配置随时切换**:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
ccconfig list # 查看所有配置
|
|
71
|
-
ccconfig start kat-air # 日常开发用免费版
|
|
72
|
-
ccconfig start kat-pro # 复杂任务用 Pro 版
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**推荐配置**:
|
|
76
|
-
- `kat-air`:日常开发,永久免费
|
|
77
|
-
- `kat-pro`:关键任务,高性能
|
|
78
|
-
- `claude`:极致性能,企业项目
|
|
79
|
-
|
|
80
|
-
**最佳实践**:80% 日常用 Air(免费),20% 复杂任务用 Pro/Claude(付费)
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## 性能对比
|
|
85
|
-
|
|
86
|
-
| 模型 | SWE-Bench Verified | 价格 |
|
|
87
|
-
|------|-------------------|------|
|
|
88
|
-
| **GPT-5-Codex** | 74.5% | 付费 |
|
|
89
|
-
| **KAT-Coder-Pro** | 73.4% | 付费 |
|
|
90
|
-
| **GPT-5** | 72.8% | 付费 |
|
|
91
|
-
| **Claude Sonnet 4** | 72.7% | $20/月 |
|
|
92
|
-
| **KAT-Coder-Air** | 轻量版* | **永久免费** |
|
|
93
|
-
|
|
94
|
-
---
|
|
95
|
-
|
|
96
|
-
## 常见问题
|
|
97
|
-
|
|
98
|
-
**Q:为什么推荐 `ccconfig start`?**
|
|
99
|
-
|
|
100
|
-
A:一条命令直接启动,无需修改 shell 配置,体验丝滑。
|
|
101
|
-
|
|
102
|
-
**Q:Air 和 Pro 有什么区别?**
|
|
103
|
-
|
|
104
|
-
A:Air 永久免费(轻量版,适合简单任务),Pro 性能更强(73.4%)+ 送 2000 万 Token。
|
|
105
|
-
|
|
106
|
-
**Q:如何切换 Air 和 Pro?**
|
|
107
|
-
|
|
108
|
-
A:添加两个配置后,`ccconfig start kat-air` 或 `ccconfig start kat-pro` 即可切换。
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## 支持开源
|
|
113
|
-
|
|
114
|
-
如果 ccconfig 帮到了你,不妨去 **GitHub 搜索"Danielmelody/ccconfig"** 给作者点个 **⭐ Star**!开源不易,感谢作者的贡献!🙏
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
**标签**:#ClaudeCode #KAT-Coder #AI编程 #免费AI #ccconfig #国产平替 #开源工具
|
|
119
|
-
|
|
120
|
-
**一句话总结**:用 ccconfig 在 Claude Code 中使用 KAT-Coder Pro(性能 73.4% 超越 GPT-5 和 Claude Sonnet 4,送 2000 万 Token 量大管饱),`ccconfig start kat-pro` 一条命令启动,性价比高覆盖大部分开发场景。
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
最近发现某老铁的 KAT-Coder Pro 可以作为 Claude Code 的平替,性能在 SWE-Bench 上达到 73.4%,超越 GPT-5 (72.8%) 和 Claude Sonnet 4 (72.7%)!, 直接 2000 万 Token(约 4000 次完整对话),这不得不冲了。
|
|
2
|
-
|
|
3
|
-
我现在把 KAT-Coder Pro 模型作为日常开发主力,遇到特别复杂的架构问题才切换到 Claude,既有高性能又不用担心 Token 用完。配置超简单,用开源工具 ccconfig 一次配置后只需一条命令启动,体验丝滑。
|
|
4
|
-
|
|
5
|
-
配置过程(5 分钟搞定):
|
|
6
|
-
|
|
7
|
-
第一步:获取 API 密钥
|
|
8
|
-
创建 StreamLake AI 的推理端点时选择 Pro 或 Air,记下 API Key。
|
|
9
|
-
|
|
10
|
-
第二步:安装配置工具
|
|
11
|
-
npm install -g ccconfig
|
|
12
|
-
ccconfig add
|
|
13
|
-
|
|
14
|
-
按提示输入配置信息:
|
|
15
|
-
• 配置名称:kat-pro
|
|
16
|
-
• ANTHROPIC_BASE_URL:官方推理端点的 API 地址
|
|
17
|
-
• ANTHROPIC_AUTH_TOKEN:你的 API Key
|
|
18
|
-
• ANTHROPIC_API_KEY:回车跳过
|
|
19
|
-
• ANTHROPIC_MODEL:KAT-Coder
|
|
20
|
-
• ANTHROPIC_SMALL_FAST_MODEL:KAT-Coder
|
|
21
|
-
|
|
22
|
-
第三步:启动使用
|
|
23
|
-
ccconfig start kat-pro
|
|
24
|
-
|
|
25
|
-
就这么简单!我配了三个:kat-pro(日常主力)、claude(复杂架构)、kat-air(免费补充)。切换只需改命令里的名字。
|
|
26
|
-
|
|
27
|
-
使用建议:Pro 作为主力(性能 73.4%),遇到特别复杂的架构设计才切其他顶级模型。Air 版处理简单任务。Pro 送的 2000 万 Token 够用很久,性价比高。
|
|
28
|
-
|
|
29
|
-
ccconfig 开源免费,还支持 Cline、RooCode 等工具。详细配置教程可以自行搜索~,开源项目可以点个 Star 支持一下 Danielmelody/ccconfig
|
|
30
|
-
|
|
31
|
-
标签:Claude Code AI编程 开发工具 KAT-Coder 程序员
|