@kaitranntt/ccs 2.4.9 → 2.5.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 +12 -3
- package/VERSION +1 -1
- package/bin/ccs.js +9 -1
- package/config/base-kimi.settings.json +12 -0
- package/lib/ccs +10 -2
- package/lib/ccs.ps1 +10 -3
- package/package.json +1 -1
- package/scripts/postinstall.js +32 -0
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**One command, zero downtime, right model for each task**
|
|
8
8
|
|
|
9
|
-
Switch between Claude Sonnet 4.5
|
|
9
|
+
Switch between Claude Sonnet 4.5, GLM 4.6, and Kimi for Coding instantly. Stop hitting rate limits. Start optimizing costs.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
[](LICENSE)
|
|
@@ -61,6 +61,9 @@ ccs "Review this architecture design"
|
|
|
61
61
|
# Switch to GLM for cost-optimized tasks
|
|
62
62
|
ccs glm "Create a simple REST API"
|
|
63
63
|
|
|
64
|
+
# Switch to Kimi for alternative option
|
|
65
|
+
ccs kimi "Write integration tests"
|
|
66
|
+
|
|
64
67
|
# Use GLM for all subsequent commands until switched back
|
|
65
68
|
ccs glm
|
|
66
69
|
ccs "Debug this issue"
|
|
@@ -94,6 +97,7 @@ bun add -g @kaitranntt/ccs
|
|
|
94
97
|
{
|
|
95
98
|
"profiles": {
|
|
96
99
|
"glm": "~/.ccs/glm.settings.json",
|
|
100
|
+
"kimi": "~/.ccs/kimi.settings.json",
|
|
97
101
|
"default": "~/.claude/settings.json"
|
|
98
102
|
}
|
|
99
103
|
}
|
|
@@ -114,10 +118,11 @@ $env:CCS_CLAUDE_PATH = "D:\Tools\Claude\claude.exe" # Windows
|
|
|
114
118
|
|
|
115
119
|
## The Daily Developer Pain Point
|
|
116
120
|
|
|
117
|
-
You have
|
|
121
|
+
You have Claude subscription, GLM Coding Plan, and Kimi for Coding. Three scenarios happen every day:
|
|
118
122
|
|
|
119
123
|
1. **Rate Limits Hit**: Claude stops mid-project → you manually edit `~/.claude/settings.json`
|
|
120
|
-
2. **Cost Waste**: Simple tasks use expensive Claude → GLM would work fine
|
|
124
|
+
2. **Cost Waste**: Simple tasks use expensive Claude → GLM or Kimi would work fine
|
|
125
|
+
3. **Model Choice**: Different tasks benefit from different model strengths → manual switching
|
|
121
126
|
|
|
122
127
|
Manual switching breaks your flow. **CCS fixes it instantly**.
|
|
123
128
|
|
|
@@ -140,8 +145,11 @@ Manual switching breaks your flow. **CCS fixes it instantly**.
|
|
|
140
145
|
```bash
|
|
141
146
|
ccs # Use Claude subscription (default)
|
|
142
147
|
ccs glm # Switch to GLM fallback
|
|
148
|
+
ccs kimi # Switch to Kimi for Coding
|
|
143
149
|
# Hit rate limit? Switch instantly:
|
|
144
150
|
ccs glm # Continue working with GLM
|
|
151
|
+
# Or switch to Kimi:
|
|
152
|
+
ccs kimi # Continue working with Kimi
|
|
145
153
|
```
|
|
146
154
|
|
|
147
155
|
One command. Zero downtime. No file editing. Right model, right task.
|
|
@@ -199,6 +207,7 @@ graph LR
|
|
|
199
207
|
```bash
|
|
200
208
|
ccs # Use Claude subscription (default)
|
|
201
209
|
ccs glm # Use GLM fallback
|
|
210
|
+
ccs kimi # Use Kimi for Coding
|
|
202
211
|
ccs --version # Show CCS version and install location
|
|
203
212
|
```
|
|
204
213
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.5.1
|
package/bin/ccs.js
CHANGED
|
@@ -99,8 +99,11 @@ function handleHelpCommand() {
|
|
|
99
99
|
console.log(colored('Profile Switching:', 'cyan'));
|
|
100
100
|
console.log(` ${colored('ccs', 'yellow')} Use default profile`);
|
|
101
101
|
console.log(` ${colored('ccs glm', 'yellow')} Switch to GLM profile`);
|
|
102
|
+
console.log(` ${colored('ccs kimi', 'yellow')} Switch to Kimi profile`);
|
|
102
103
|
console.log(` ${colored('ccs glm', 'yellow')} "debug this code" Switch to GLM and run command`);
|
|
104
|
+
console.log(` ${colored('ccs kimi', 'yellow')} "write tests" Switch to Kimi and run command`);
|
|
103
105
|
console.log(` ${colored('ccs glm', 'yellow')} --verbose Switch to GLM with Claude flags`);
|
|
106
|
+
console.log(` ${colored('ccs kimi', 'yellow')} --verbose Switch to Kimi with Claude flags`);
|
|
104
107
|
console.log('');
|
|
105
108
|
|
|
106
109
|
// Flags
|
|
@@ -120,6 +123,7 @@ function handleHelpCommand() {
|
|
|
120
123
|
console.log(colored('Examples:', 'cyan'));
|
|
121
124
|
console.log(' # Try without installing');
|
|
122
125
|
console.log(` ${colored('npx @kaitranntt/ccs glm', 'yellow')} "write tests"`);
|
|
126
|
+
console.log(` ${colored('npx @kaitranntt/ccs kimi', 'yellow')} "write tests"`);
|
|
123
127
|
console.log('');
|
|
124
128
|
console.log(' # Use default Claude subscription');
|
|
125
129
|
console.log(` ${colored('ccs', 'yellow')} "Review this architecture"`);
|
|
@@ -127,8 +131,12 @@ function handleHelpCommand() {
|
|
|
127
131
|
console.log(' # Switch to GLM for cost-effective tasks');
|
|
128
132
|
console.log(` ${colored('ccs glm', 'yellow')} "Write unit tests"`);
|
|
129
133
|
console.log('');
|
|
130
|
-
console.log(' #
|
|
134
|
+
console.log(' # Switch to Kimi for alternative option');
|
|
135
|
+
console.log(` ${colored('ccs kimi', 'yellow')} "Write integration tests"`);
|
|
136
|
+
console.log('');
|
|
137
|
+
console.log(' # Use with verbose output');
|
|
131
138
|
console.log(` ${colored('ccs glm', 'yellow')} --verbose "Debug error"`);
|
|
139
|
+
console.log(` ${colored('ccs kimi', 'yellow')} --verbose "Review code"`);
|
|
132
140
|
console.log('');
|
|
133
141
|
|
|
134
142
|
// Uninstall
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"ANTHROPIC_BASE_URL": "https://api.kimi.com/coding/",
|
|
4
|
+
"ANTHROPIC_AUTH_TOKEN": "YOUR_KIMI_API_KEY_HERE",
|
|
5
|
+
"ANTHROPIC_MODEL": "kimi-for-coding",
|
|
6
|
+
"ANTHROPIC_SMALL_FAST_MODEL": "kimi-for-coding",
|
|
7
|
+
"ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-for-coding",
|
|
8
|
+
"ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-for-coding",
|
|
9
|
+
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "kimi-for-coding"
|
|
10
|
+
},
|
|
11
|
+
"alwaysThinkingEnabled": true
|
|
12
|
+
}
|
package/lib/ccs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
# Version (updated by scripts/bump-version.sh)
|
|
5
|
-
CCS_VERSION="2.
|
|
5
|
+
CCS_VERSION="2.5.1"
|
|
6
6
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
7
|
readonly CONFIG_FILE="${CCS_CONFIG:-$HOME/.ccs/config.json}"
|
|
8
8
|
|
|
@@ -46,8 +46,11 @@ show_help() {
|
|
|
46
46
|
echo -e "${CYAN}Profile Switching:${RESET}"
|
|
47
47
|
echo -e " ${YELLOW}ccs${RESET} Use default profile"
|
|
48
48
|
echo -e " ${YELLOW}ccs glm${RESET} Switch to GLM profile"
|
|
49
|
+
echo -e " ${YELLOW}ccs kimi${RESET} Switch to Kimi profile"
|
|
49
50
|
echo -e " ${YELLOW}ccs glm${RESET} \"debug this code\" Switch to GLM and run command"
|
|
51
|
+
echo -e " ${YELLOW}ccs kimi${RESET} \"write tests\" Switch to Kimi and run command"
|
|
50
52
|
echo -e " ${YELLOW}ccs glm${RESET} --verbose Switch to GLM with Claude flags"
|
|
53
|
+
echo -e " ${YELLOW}ccs kimi${RESET} --verbose Switch to Kimi with Claude flags"
|
|
51
54
|
echo ""
|
|
52
55
|
echo -e "${CYAN}Flags:${RESET}"
|
|
53
56
|
echo -e " ${YELLOW}-h, --help${RESET} Show this help message"
|
|
@@ -65,8 +68,12 @@ show_help() {
|
|
|
65
68
|
echo -e " # Switch to GLM for cost-effective tasks"
|
|
66
69
|
echo -e " ${YELLOW}ccs glm${RESET} \"Write unit tests\""
|
|
67
70
|
echo ""
|
|
68
|
-
echo -e " #
|
|
71
|
+
echo -e " # Switch to Kimi for alternative option"
|
|
72
|
+
echo -e " ${YELLOW}ccs kimi${RESET} \"Write integration tests\""
|
|
73
|
+
echo ""
|
|
74
|
+
echo -e " # Use with verbose output"
|
|
69
75
|
echo -e " ${YELLOW}ccs glm${RESET} --verbose \"Debug error\""
|
|
76
|
+
echo -e " ${YELLOW}ccs kimi${RESET} --verbose \"Review code\""
|
|
70
77
|
echo ""
|
|
71
78
|
echo -e "${YELLOW}Uninstall:${RESET}"
|
|
72
79
|
echo -e " macOS/Linux: curl -fsSL ccs.kaitran.ca/uninstall | bash"
|
|
@@ -392,6 +399,7 @@ Solutions:
|
|
|
392
399
|
{
|
|
393
400
|
\"profiles\": {
|
|
394
401
|
\"glm\": \"~/.ccs/glm.settings.json\",
|
|
402
|
+
\"kimi\": \"~/.ccs/kimi.settings.json\",
|
|
395
403
|
\"default\": \"~/.claude/settings.json\"
|
|
396
404
|
}
|
|
397
405
|
}
|
package/lib/ccs.ps1
CHANGED
|
@@ -98,8 +98,11 @@ function Show-Help {
|
|
|
98
98
|
Write-ColorLine "Profile Switching:" "Cyan"
|
|
99
99
|
Write-ColorLine " ccs Use default profile" "Yellow"
|
|
100
100
|
Write-ColorLine " ccs glm Switch to GLM profile" "Yellow"
|
|
101
|
+
Write-ColorLine " ccs kimi Switch to Kimi profile" "Yellow"
|
|
101
102
|
Write-ColorLine " ccs glm 'debug this code' Switch to GLM and run command" "Yellow"
|
|
103
|
+
Write-ColorLine " ccs kimi 'write tests' Switch to Kimi and run command" "Yellow"
|
|
102
104
|
Write-ColorLine " ccs glm --verbose Switch to GLM with Claude flags" "Yellow"
|
|
105
|
+
Write-ColorLine " ccs kimi --verbose Switch to Kimi with Claude flags" "Yellow"
|
|
103
106
|
Write-Host ""
|
|
104
107
|
Write-ColorLine "Flags:" "Cyan"
|
|
105
108
|
Write-ColorLine " -h, --help Show this help message" "Yellow"
|
|
@@ -117,8 +120,12 @@ function Show-Help {
|
|
|
117
120
|
Write-Host " # Switch to GLM for cost-effective tasks"
|
|
118
121
|
Write-ColorLine " ccs glm 'Write unit tests'" "Yellow"
|
|
119
122
|
Write-Host ""
|
|
120
|
-
Write-Host " #
|
|
123
|
+
Write-Host " # Switch to Kimi for alternative option"
|
|
124
|
+
Write-ColorLine " ccs kimi 'Write integration tests'" "Yellow"
|
|
125
|
+
Write-Host ""
|
|
126
|
+
Write-Host " # Use with verbose output"
|
|
121
127
|
Write-ColorLine " ccs glm --verbose 'Debug error'" "Yellow"
|
|
128
|
+
Write-ColorLine " ccs kimi --verbose 'Review code'" "Yellow"
|
|
122
129
|
Write-Host ""
|
|
123
130
|
Write-ColorLine "Uninstall:" "Cyan"
|
|
124
131
|
Write-Host " macOS/Linux: curl -fsSL ccs.kaitran.ca/uninstall | bash"
|
|
@@ -134,7 +141,7 @@ function Show-Help {
|
|
|
134
141
|
}
|
|
135
142
|
|
|
136
143
|
# Version (updated by scripts/bump-version.sh)
|
|
137
|
-
$CcsVersion = "2.
|
|
144
|
+
$CcsVersion = "2.5.1"
|
|
138
145
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
139
146
|
$ConfigFile = if ($env:CCS_CONFIG) { $env:CCS_CONFIG } else { "$env:USERPROFILE\.ccs\config.json" }
|
|
140
147
|
|
|
@@ -268,7 +275,7 @@ if (-not (Test-Path $ConfigFile)) {
|
|
|
268
275
|
" irm ccs.kaitran.ca/install | iex" + "`n`n" +
|
|
269
276
|
" 2. Or create config manually:" + "`n" +
|
|
270
277
|
" New-Item -ItemType Directory -Force -Path '$env:USERPROFILE\.ccs'" + "`n" +
|
|
271
|
-
" Set-Content -Path '$env:USERPROFILE\.ccs\config.json' -Value '{`"profiles`":{`"glm`":`"~/.ccs/glm.settings.json`",`"default`":`"~/.claude/settings.json`"}}'"
|
|
278
|
+
" Set-Content -Path '$env:USERPROFILE\.ccs\config.json' -Value '{`"profiles`":{`"glm`":`"~/.ccs/glm.settings.json`",`"kimi`":`"~/.ccs/kimi.settings.json`",`"default`":`"~/.claude/settings.json`"}}'"
|
|
272
279
|
|
|
273
280
|
Write-ErrorMsg $ErrorMessage
|
|
274
281
|
exit 1
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -32,6 +32,7 @@ function createConfigFiles() {
|
|
|
32
32
|
const config = {
|
|
33
33
|
profiles: {
|
|
34
34
|
glm: '~/.ccs/glm.settings.json',
|
|
35
|
+
kimi: '~/.ccs/kimi.settings.json',
|
|
35
36
|
default: '~/.claude/settings.json'
|
|
36
37
|
}
|
|
37
38
|
};
|
|
@@ -75,6 +76,37 @@ function createConfigFiles() {
|
|
|
75
76
|
console.log('[OK] GLM profile exists: ~/.ccs/glm.settings.json (preserved)');
|
|
76
77
|
}
|
|
77
78
|
|
|
79
|
+
// Create kimi.settings.json if missing
|
|
80
|
+
const kimiSettingsPath = path.join(ccsDir, 'kimi.settings.json');
|
|
81
|
+
if (!fs.existsSync(kimiSettingsPath)) {
|
|
82
|
+
const kimiSettings = {
|
|
83
|
+
env: {
|
|
84
|
+
ANTHROPIC_BASE_URL: 'https://api.kimi.com/coding/',
|
|
85
|
+
ANTHROPIC_AUTH_TOKEN: 'YOUR_KIMI_API_KEY_HERE',
|
|
86
|
+
ANTHROPIC_MODEL: 'kimi-for-coding',
|
|
87
|
+
ANTHROPIC_SMALL_FAST_MODEL: 'kimi-for-coding',
|
|
88
|
+
ANTHROPIC_DEFAULT_OPUS_MODEL: 'kimi-for-coding',
|
|
89
|
+
ANTHROPIC_DEFAULT_SONNET_MODEL: 'kimi-for-coding',
|
|
90
|
+
ANTHROPIC_DEFAULT_HAIKU_MODEL: 'kimi-for-coding'
|
|
91
|
+
},
|
|
92
|
+
alwaysThinkingEnabled: true
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
// Atomic write
|
|
96
|
+
const tmpPath = `${kimiSettingsPath}.tmp`;
|
|
97
|
+
fs.writeFileSync(tmpPath, JSON.stringify(kimiSettings, null, 2) + '\n', 'utf8');
|
|
98
|
+
fs.renameSync(tmpPath, kimiSettingsPath);
|
|
99
|
+
|
|
100
|
+
console.log('[OK] Created Kimi profile: ~/.ccs/kimi.settings.json');
|
|
101
|
+
console.log('');
|
|
102
|
+
console.log(' [!] Configure Kimi API key:');
|
|
103
|
+
console.log(' 1. Get key from: https://www.kimi.com/coding (membership page)');
|
|
104
|
+
console.log(' 2. Edit: ~/.ccs/kimi.settings.json');
|
|
105
|
+
console.log(' 3. Replace: YOUR_KIMI_API_KEY_HERE');
|
|
106
|
+
} else {
|
|
107
|
+
console.log('[OK] Kimi profile exists: ~/.ccs/kimi.settings.json (preserved)');
|
|
108
|
+
}
|
|
109
|
+
|
|
78
110
|
console.log('');
|
|
79
111
|
console.log('[OK] CCS configuration ready!');
|
|
80
112
|
console.log(' Run: ccs --version');
|