@kaitranntt/ccs 5.17.0 → 5.18.0-dev.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 +110 -925
- package/VERSION +1 -1
- package/dist/ccs.js +6 -0
- package/dist/ccs.js.map +1 -1
- package/dist/cliproxy/auth-handler.d.ts.map +1 -1
- package/dist/cliproxy/auth-handler.js +7 -1
- package/dist/cliproxy/auth-handler.js.map +1 -1
- package/dist/cliproxy/config-generator.d.ts +2 -1
- package/dist/cliproxy/config-generator.d.ts.map +1 -1
- package/dist/cliproxy/config-generator.js +26 -3
- package/dist/cliproxy/config-generator.js.map +1 -1
- package/dist/commands/cleanup-command.d.ts +11 -0
- package/dist/commands/cleanup-command.d.ts.map +1 -0
- package/dist/commands/cleanup-command.js +202 -0
- package/dist/commands/cleanup-command.js.map +1 -0
- package/dist/commands/help-command.d.ts.map +1 -1
- package/dist/commands/help-command.js +1 -0
- package/dist/commands/help-command.js.map +1 -1
- package/dist/commands/version-command.d.ts.map +1 -1
- package/dist/commands/version-command.js +1 -1
- package/dist/commands/version-command.js.map +1 -1
- package/dist/config/unified-config-loader.d.ts.map +1 -1
- package/dist/config/unified-config-loader.js +4 -0
- package/dist/config/unified-config-loader.js.map +1 -1
- package/dist/config/unified-config-types.d.ts +13 -0
- package/dist/config/unified-config-types.d.ts.map +1 -1
- package/dist/config/unified-config-types.js +4 -0
- package/dist/config/unified-config-types.js.map +1 -1
- package/dist/ui/assets/{accounts-BeL69fgi.js → accounts-achdtDUJ.js} +1 -1
- package/dist/ui/assets/{analytics-CAiq9C19.js → analytics-BVlC8Y7-.js} +1 -1
- package/dist/ui/assets/{api-CvY-Z9t4.js → api-BwWsFLoC.js} +1 -1
- package/dist/ui/assets/{cliproxy-DbfUkLCy.js → cliproxy-DuaxYcVk.js} +1 -1
- package/dist/ui/assets/{code-editor-xnukAIwJ.js → code-editor-D7CYoILm.js} +1 -1
- package/dist/ui/assets/{health-D29me3pE.js → health-Xbq8eUat.js} +1 -1
- package/dist/ui/assets/index-B1gvMo-b.css +1 -0
- package/dist/ui/assets/index-C2RMogI8.js +12 -0
- package/dist/ui/assets/{settings-C-IIOnQo.js → settings-95g3F5Gk.js} +1 -1
- package/dist/ui/assets/{shared-DRWHGJPD.js → shared-Cg5XjdQM.js} +1 -1
- package/dist/ui/index.html +2 -2
- package/dist/web-server/usage-routes.js +64 -5
- package/dist/web-server/usage-routes.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/index-CVMaabkX.js +0 -12
- package/dist/ui/assets/index-DMEwxqAV.css +0 -1
package/README.md
CHANGED
|
@@ -2,1070 +2,255 @@
|
|
|
2
2
|
|
|
3
3
|
# CCS - Claude Code Switch
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
|
|
7
|
-
###
|
|
8
|
-
|
|
9
|
-
Features a modern React 19 dashboard with real-time updates and unified configuration.
|
|
7
|
+
### The universal AI profile manager for Claude Code.
|
|
8
|
+
Run Claude, Gemini, GLM, and any Anthropic-compatible API - concurrently, without conflicts.
|
|
10
9
|
|
|
11
10
|
[](LICENSE)
|
|
12
|
-
[]()
|
|
13
|
-
[](https://claudekit.cc?ref=HMNKXOHN)
|
|
14
|
-
|
|
15
11
|
[](https://www.npmjs.com/package/@kaitranntt/ccs)
|
|
16
|
-
[](https://www.typescriptlang.org/)
|
|
12
|
+
[](https://claudekit.cc?ref=HMNKXOHN)
|
|
18
13
|
|
|
19
|
-
**
|
|
14
|
+
**[Features & Pricing](https://ccs.kaitran.ca)** | **[Documentation](https://docs.ccs.kaitran.ca)**
|
|
20
15
|
|
|
21
16
|
</div>
|
|
22
17
|
|
|
23
18
|
<br>
|
|
24
19
|
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
### Installation
|
|
28
|
-
|
|
29
|
-
**npm Package (Recommended)**
|
|
30
|
-
|
|
31
|
-
**macOS / Linux / Windows**
|
|
32
|
-
```bash
|
|
33
|
-
npm install -g @kaitranntt/ccs
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
**All major package managers are supported:**
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
# yarn
|
|
40
|
-
yarn global add @kaitranntt/ccs
|
|
41
|
-
|
|
42
|
-
# pnpm (70% less disk space)
|
|
43
|
-
pnpm add -g @kaitranntt/ccs
|
|
44
|
-
|
|
45
|
-
# bun (30x faster)
|
|
46
|
-
bun add -g @kaitranntt/ccs
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
<details>
|
|
50
|
-
<summary><strong>[!] DEPRECATED: Native Shell Installers (Legacy)</strong></summary>
|
|
51
|
-
|
|
52
|
-
<br>
|
|
53
|
-
|
|
54
|
-
> [!WARNING]
|
|
55
|
-
> **These installers are deprecated and will be removed in a future version.**
|
|
56
|
-
> They now auto-redirect to npm installation. Please use npm directly.
|
|
57
|
-
|
|
58
|
-
**macOS / Linux**
|
|
59
|
-
```bash
|
|
60
|
-
curl -fsSL ccs.kaitran.ca/install | bash
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
**Windows PowerShell**
|
|
64
|
-
```powershell
|
|
65
|
-
irm ccs.kaitran.ca/install | iex
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
**Note:** Scripts show deprecation warning and automatically run npm installation if Node.js is available.
|
|
20
|
+
## The Three Pillars
|
|
69
21
|
|
|
70
|
-
|
|
22
|
+
| Capability | What It Does | Manage Via |
|
|
23
|
+
|------------|--------------|------------|
|
|
24
|
+
| **Multiple Claude Accounts** | Run work + personal Claude subs simultaneously | Dashboard |
|
|
25
|
+
| **OAuth Providers** | Gemini, Codex, Antigravity - zero API keys needed | Dashboard |
|
|
26
|
+
| **API Profiles** | GLM, Kimi, or any Anthropic-compatible API | Dashboard |
|
|
71
27
|
|
|
72
28
|
<br>
|
|
73
29
|
|
|
74
|
-
##
|
|
75
|
-
|
|
76
|
-
**New in v5.0.0**: Instant access to premium models with zero API key setup. Browser-based OAuth authentication.
|
|
77
|
-
|
|
78
|
-
> Powered by [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI) - the universal API proxy for AI models.
|
|
79
|
-
|
|
80
|
-
| Provider | Default Model | Opus | Haiku | Example |
|
|
81
|
-
|:---------|:--------------|:-----|:------|:--------|
|
|
82
|
-
| **Gemini** | gemini-2.5-pro | gemini-2.5-pro | gemini-2.5-flash | `ccs gemini "explain code"` |
|
|
83
|
-
| **Codex** | gpt-5.1-codex-max | gpt-5.1-codex-max-high | gpt-5.1-codex-mini-high | `ccs codex "implement API"` |
|
|
84
|
-
| **Antigravity** | gemini-3-pro-preview | gemini-3-pro-preview | gemini-2.5-flash | `ccs agy "review architecture"` |
|
|
85
|
-
|
|
86
|
-
**First Run**: Browser opens for authentication. Tokens cached in `~/.ccs/cliproxy/auth/<provider>/`.
|
|
87
|
-
|
|
88
|
-
**Subsequent Runs**: Instant - no re-auth needed until token expires.
|
|
89
|
-
|
|
90
|
-
### Authentication Commands
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
# Interactive OAuth (default) - browser opens, complete auth
|
|
94
|
-
ccs gemini
|
|
95
|
-
|
|
96
|
-
# Authenticate only (save tokens, don't start session)
|
|
97
|
-
ccs gemini --auth
|
|
98
|
-
ccs codex --auth
|
|
99
|
-
|
|
100
|
-
# Headless mode (for SSH/servers without browser)
|
|
101
|
-
ccs agy --headless # Displays URL, paste in browser elsewhere
|
|
102
|
-
|
|
103
|
-
# Logout (clear tokens)
|
|
104
|
-
ccs gemini --logout
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Multi-Account for OAuth Providers
|
|
108
|
-
|
|
109
|
-
Use multiple accounts per provider (work + personal):
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
# First account (default)
|
|
113
|
-
ccs gemini --auth
|
|
114
|
-
|
|
115
|
-
# Add another account
|
|
116
|
-
ccs gemini --auth --add
|
|
117
|
-
|
|
118
|
-
# Add with nickname for easy identification
|
|
119
|
-
ccs gemini --auth --add --nickname work
|
|
120
|
-
|
|
121
|
-
# Codex provider examples
|
|
122
|
-
ccs codex --auth # First account for Codex
|
|
123
|
-
ccs codex --auth --add # Add another Codex account
|
|
124
|
-
ccs codex --auth --add --nickname work # Named account
|
|
125
|
-
|
|
126
|
-
# List all accounts (any provider)
|
|
127
|
-
ccs gemini --accounts
|
|
128
|
-
ccs codex --accounts
|
|
129
|
-
ccs agy --accounts
|
|
130
|
-
|
|
131
|
-
# Switch to a different account
|
|
132
|
-
ccs gemini --use work
|
|
133
|
-
ccs codex --use work
|
|
134
|
-
ccs agy --use work
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Accounts are stored in `~/.ccs/cliproxy/accounts.json` and can be managed via web dashboard (`ccs config`).
|
|
138
|
-
|
|
139
|
-
### OAuth vs API Key Models
|
|
140
|
-
|
|
141
|
-
| Feature | OAuth Providers<br>(gemini, codex, agy) | API Key Models<br>(glm, kimi) |
|
|
142
|
-
|:--------|:----------------------------------------|:------------------------------|
|
|
143
|
-
| **Setup** | Browser auth on first run | Edit settings.json, add API key |
|
|
144
|
-
| **Token Storage** | `~/.ccs/cliproxy/auth/<provider>/` | `~/.ccs/*.settings.json` |
|
|
145
|
-
| **Renewal** | Automatic (OAuth refresh tokens) | Manual (update key when expired) |
|
|
146
|
-
| **Binary** | Auto-downloads CLIProxyAPI (~15MB) | No additional binaries |
|
|
147
|
-
| **Port** | 8317 (configurable) | N/A |
|
|
148
|
-
| **Best For** | Quick testing, no key management | Production, explicit key control |
|
|
149
|
-
|
|
150
|
-
### Troubleshooting OAuth
|
|
30
|
+
## Quick Start
|
|
151
31
|
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
# If browser doesn't load in time:
|
|
155
|
-
ccs gemini --auth --headless # Get URL manually
|
|
156
|
-
```
|
|
32
|
+
### 1. Install
|
|
157
33
|
|
|
158
|
-
**Port 8317 conflict**:
|
|
159
34
|
```bash
|
|
160
|
-
|
|
161
|
-
# Error: "Port 8317 in use"
|
|
162
|
-
lsof -ti:8317 | xargs kill # Unix: kill process using port
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
**Binary download failures**:
|
|
166
|
-
```bash
|
|
167
|
-
ccs doctor # Shows binary status + version
|
|
168
|
-
# Manual download: https://github.com/router-for-me/CLIProxyAPI/releases
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
<br>
|
|
172
|
-
|
|
173
|
-
### Configuration (Auto-created)
|
|
174
|
-
|
|
175
|
-
**CCS automatically creates configuration during installation** (via npm postinstall script).
|
|
176
|
-
|
|
177
|
-
**~/.ccs/config.json**:
|
|
178
|
-
```json
|
|
179
|
-
{
|
|
180
|
-
"profiles": {
|
|
181
|
-
"glm": "~/.ccs/glm.settings.json",
|
|
182
|
-
"glmt": "~/.ccs/glmt.settings.json",
|
|
183
|
-
"kimi": "~/.ccs/kimi.settings.json",
|
|
184
|
-
"default": "~/.claude/settings.json"
|
|
185
|
-
}
|
|
186
|
-
}
|
|
35
|
+
npm install -g @kaitranntt/ccs
|
|
187
36
|
```
|
|
188
37
|
|
|
189
38
|
<details>
|
|
190
|
-
<summary
|
|
191
|
-
|
|
192
|
-
<br>
|
|
193
|
-
|
|
194
|
-
If Claude CLI is installed in a non-standard location (D drive, custom directory), set `CCS_CLAUDE_PATH`:
|
|
39
|
+
<summary>Alternative package managers</summary>
|
|
195
40
|
|
|
196
41
|
```bash
|
|
197
|
-
|
|
198
|
-
|
|
42
|
+
yarn global add @kaitranntt/ccs # yarn
|
|
43
|
+
pnpm add -g @kaitranntt/ccs # pnpm (70% less disk space)
|
|
44
|
+
bun add -g @kaitranntt/ccs # bun (30x faster)
|
|
199
45
|
```
|
|
200
46
|
|
|
201
|
-
**See also:** [Troubleshooting Guide](./docs/en/troubleshooting.md#claude-cli-in-non-standard-location) for detailed setup instructions.
|
|
202
|
-
|
|
203
47
|
</details>
|
|
204
48
|
|
|
205
|
-
|
|
206
|
-
<summary><h3>Windows Symlink Support (Developer Mode)</h3></summary>
|
|
207
|
-
|
|
208
|
-
<br>
|
|
209
|
-
|
|
210
|
-
**Windows users**: Enable Developer Mode for true symlinks (better performance, instant sync):
|
|
211
|
-
|
|
212
|
-
1. Open **Settings** → **Privacy & Security** → **For developers**
|
|
213
|
-
2. Enable **Developer Mode**
|
|
214
|
-
3. Reinstall CCS: `npm install -g @kaitranntt/ccs`
|
|
215
|
-
|
|
216
|
-
**Warning:** Without Developer Mode, CCS automatically falls back to copying directories (works but no instant sync across profiles).
|
|
217
|
-
|
|
218
|
-
</details>
|
|
219
|
-
|
|
220
|
-
<br>
|
|
221
|
-
|
|
222
|
-
### Your First Switch
|
|
223
|
-
|
|
224
|
-
> [!IMPORTANT]
|
|
225
|
-
> **Before using alternative models, update API keys in settings files:**
|
|
226
|
-
>
|
|
227
|
-
> - **GLM**: Edit `~/.ccs/glm.settings.json` and add your Z.AI Coding Plan API Key
|
|
228
|
-
> - **GLMT**: Edit `~/.ccs/glmt.settings.json` and add your Z.AI Coding Plan API Key
|
|
229
|
-
> - **Kimi**: Edit `~/.ccs/kimi.settings.json` and add your Kimi API key
|
|
230
|
-
|
|
231
|
-
<br>
|
|
232
|
-
|
|
233
|
-
**Parallel Workflow: Planning + Execution**
|
|
49
|
+
### 2. Open Dashboard
|
|
234
50
|
|
|
235
51
|
```bash
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
# Terminal 2 - Execution (GLM, cost-optimized)
|
|
240
|
-
ccs glm "Implement the user authentication endpoints from the plan"
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
<details>
|
|
244
|
-
<summary><strong>Thinking Models (Kimi & GLMT)</strong></summary>
|
|
245
|
-
|
|
246
|
-
<br>
|
|
247
|
-
|
|
248
|
-
```bash
|
|
249
|
-
# Kimi - Stable thinking support
|
|
250
|
-
ccs kimi "Design a caching strategy with trade-off analysis"
|
|
251
|
-
|
|
252
|
-
# GLMT - Experimental (see full disclaimer below)
|
|
253
|
-
ccs glmt "Debug complex algorithm with reasoning steps"
|
|
52
|
+
ccs config
|
|
53
|
+
# Opens http://localhost:3000
|
|
254
54
|
```
|
|
255
55
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
</details>
|
|
56
|
+
### 3. Configure Your Accounts
|
|
259
57
|
|
|
260
|
-
|
|
58
|
+
The dashboard provides visual management for all account types:
|
|
261
59
|
|
|
262
|
-
|
|
60
|
+
- **Claude Accounts**: Create isolated instances (work, personal, client)
|
|
61
|
+
- **OAuth Providers**: One-click auth for Gemini, Codex, Antigravity
|
|
62
|
+
- **API Profiles**: Configure GLM, Kimi with your keys
|
|
63
|
+
- **Health Monitor**: Real-time status across all profiles
|
|
263
64
|
|
|
264
|
-
|
|
65
|
+
**Analytics (Light/Dark Theme)**
|
|
265
66
|
|
|
266
|
-
|
|
67
|
+

|
|
267
68
|
|
|
268
|
-
|
|
269
|
-
</div>
|
|
69
|
+

|
|
270
70
|
|
|
271
|
-
|
|
272
|
-
Then: 🔴 _"You've reached your usage limit."_
|
|
71
|
+
**API Profiles & OAuth Providers**
|
|
273
72
|
|
|
274
|
-
|
|
73
|
+

|
|
275
74
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
<details>
|
|
279
|
-
<summary><strong>❌ OLD WAY:</strong> Switch When You Hit Limits (Reactive)</summary>
|
|
75
|
+

|
|
280
76
|
|
|
281
77
|
<br>
|
|
282
78
|
|
|
283
|
-
|
|
284
|
-
graph LR
|
|
285
|
-
A[2pm: Building features<br/>In the zone] --> B[3pm: Usage limit hit<br/>BLOCKED]
|
|
286
|
-
B --> C[3:05pm: Stop work<br/>Edit settings.json]
|
|
287
|
-
C --> D[3:15pm: Switch accounts<br/>Context lost]
|
|
288
|
-
D --> E[3:30pm: Restart<br/>Trying to focus]
|
|
289
|
-
E --> F[4pm: Finally productive<br/>Back in flow]
|
|
290
|
-
|
|
291
|
-
style A fill:#d4edda,stroke:#333,color:#000
|
|
292
|
-
style B fill:#f8d7da,stroke:#333,color:#000
|
|
293
|
-
style C fill:#fff3cd,stroke:#333,color:#000
|
|
294
|
-
style D fill:#f8d7da,stroke:#333,color:#000
|
|
295
|
-
style E fill:#fff3cd,stroke:#333,color:#000
|
|
296
|
-
style F fill:#d4edda,stroke:#333,color:#000
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
**Result:** 1 hour lost, momentum destroyed, frustration builds
|
|
300
|
-
|
|
301
|
-
</details>
|
|
302
|
-
|
|
303
|
-
<details open>
|
|
304
|
-
<summary><strong>✨ NEW WAY:</strong> Run Parallel From Start (Proactive) - <strong>RECOMMENDED</strong></summary>
|
|
305
|
-
|
|
306
|
-
<br>
|
|
307
|
-
|
|
308
|
-
```mermaid
|
|
309
|
-
graph LR
|
|
310
|
-
A[2pm: Start work] --> B[Terminal 1: Claude Pro<br/>Strategic planning]
|
|
311
|
-
A --> C[Terminal 2: GLM<br/>Code execution]
|
|
312
|
-
B --> D[3pm: Still shipping<br/>No interruptions]
|
|
313
|
-
C --> D
|
|
314
|
-
D --> E[4pm: Flow state<br/>Productivity peak]
|
|
315
|
-
E --> F[5pm: Features shipped<br/>Context maintained]
|
|
316
|
-
|
|
317
|
-
style A fill:#e7f3ff,stroke:#333,color:#000
|
|
318
|
-
style B fill:#cfe2ff,stroke:#333,color:#000
|
|
319
|
-
style C fill:#cfe2ff,stroke:#333,color:#000
|
|
320
|
-
style D fill:#d4edda,stroke:#333,color:#000
|
|
321
|
-
style E fill:#d4edda,stroke:#333,color:#000
|
|
322
|
-
style F fill:#d4edda,stroke:#333,color:#000
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
**Result:** Zero downtime, continuous productivity, less frustration
|
|
326
|
-
|
|
327
|
-
### 💰 **The Value Proposition:**
|
|
328
|
-
- **Setup:** Your existing Claude Pro + GLM Lite (cost-effective add-on)
|
|
329
|
-
- **Value:** Save 1 hour/day × 20 workdays = 20 hours/month recovered
|
|
330
|
-
- **ROI:** Your development time is worth more than the setup cost
|
|
331
|
-
- **Reality:** Shipping faster than the overhead
|
|
332
|
-
|
|
333
|
-
</details>
|
|
334
|
-
|
|
335
|
-
## Choose Your Path
|
|
336
|
-
|
|
337
|
-
<details>
|
|
338
|
-
<summary><strong>Budget-Focused:</strong> GLM Only</summary>
|
|
339
|
-
|
|
340
|
-
- **Best for:** Cost-conscious development, basic code generation
|
|
341
|
-
- **Usage:** Just use `ccs glm` directly for cost-effective AI assistance
|
|
342
|
-
- **Reality:** No Claude access, but capable for many coding tasks
|
|
343
|
-
- **Setup:** GLM API key only, very affordable
|
|
344
|
-
|
|
345
|
-
</details>
|
|
346
|
-
|
|
347
|
-
<details open>
|
|
348
|
-
<summary><strong>✨ Recommended for Daily Development:</strong> 1 Claude Pro + 1 GLM Lite</summary>
|
|
79
|
+
## Built-in Providers
|
|
349
80
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
81
|
+
| Provider | Auth Type | Command | Best For |
|
|
82
|
+
|----------|-----------|---------|----------|
|
|
83
|
+
| **Claude** | Subscription | `ccs` | Default, strategic planning |
|
|
84
|
+
| **Gemini** | OAuth | `ccs gemini` | Zero-config, fast iteration |
|
|
85
|
+
| **Codex** | OAuth | `ccs codex` | Code generation |
|
|
86
|
+
| **Antigravity** | OAuth | `ccs agy` | Alternative routing |
|
|
87
|
+
| **GLM** | API Key | `ccs glm` | Cost-optimized execution |
|
|
88
|
+
| **Kimi** | API Key | `ccs kimi` | Long-context, thinking mode |
|
|
354
89
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
<details>
|
|
358
|
-
<summary><strong>Power User:</strong> Multiple Claude Pro + GLM Pro</summary>
|
|
359
|
-
|
|
360
|
-
- **Best for:** Heavy workloads, concurrent projects, solo dev
|
|
361
|
-
- **Unlocks:** Never drain session or weekly limits
|
|
362
|
-
- **Workflow:** 3+ terminals running specialized tasks simultaneously
|
|
363
|
-
|
|
364
|
-
</details>
|
|
365
|
-
|
|
366
|
-
<details>
|
|
367
|
-
<summary><strong>Privacy-Focused:</strong> Work/Personal Isolation</summary>
|
|
368
|
-
|
|
369
|
-
- **When needed:** Strict separation of work and personal AI contexts
|
|
370
|
-
- **Setup:** `ccs auth create work` + `ccs auth create personal`
|
|
371
|
-
- **Note:** Advanced feature - most users don't need this
|
|
372
|
-
|
|
373
|
-
</details>
|
|
374
|
-
|
|
375
|
-
---
|
|
376
|
-
|
|
377
|
-
## Why CCS Instead of Manual Switching?
|
|
378
|
-
|
|
379
|
-
<div align="center">
|
|
380
|
-
|
|
381
|
-
**CCS isn't about "switching when you hit limits at 3pm."**
|
|
382
|
-
|
|
383
|
-
## **It's about running in parallel from the start.**
|
|
384
|
-
|
|
385
|
-
</div>
|
|
386
|
-
|
|
387
|
-
### The Core Difference
|
|
388
|
-
|
|
389
|
-
| **Manual Switching** | **CCS Orchestration** |
|
|
390
|
-
|:---|:---|
|
|
391
|
-
| 🔴 Hit limits → Stop work → Edit config files → Restart | ✅ Multiple terminals running different models from the start |
|
|
392
|
-
| 😰 Context loss and flow state interruption | 😌 Continuous productivity with preserved context |
|
|
393
|
-
| 📝 Sequential task handling | ⚡ Parallel workflows (planning + execution simultaneously) |
|
|
394
|
-
| 🛠️ Reactive problem solving when blocked | 🎯 Proactive workflow design prevents blocks |
|
|
395
|
-
|
|
396
|
-
### What CCS Gives You
|
|
397
|
-
|
|
398
|
-
- **Zero Context Switching**: Keep your flow state without interruption
|
|
399
|
-
- **Parallel Productivity**: Strategic planning in one terminal, code execution in another
|
|
400
|
-
- **Instant Account Management**: One command switches, no config file editing
|
|
401
|
-
- **Work-Life Separation**: Isolate contexts without logging out
|
|
402
|
-
- **Cross-Platform Consistency**: Same smooth experience on macOS, Linux, Windows
|
|
403
|
-
|
|
404
|
-
**Manual context switching breaks workflow. CCS orchestrates seamlessly.**
|
|
405
|
-
|
|
406
|
-
<br>
|
|
407
|
-
|
|
408
|
-
## Architecture
|
|
409
|
-
|
|
410
|
-
CCS resolves profiles in priority order:
|
|
411
|
-
1. **CLIProxy profiles** (gemini, codex, agy) - OAuth-based, zero config
|
|
412
|
-
2. **CLIProxy variants** (user-defined) - Custom model settings for CLIProxy providers
|
|
413
|
-
3. **Settings-based profiles** (glm, kimi) - API key required
|
|
414
|
-
4. **Account-based profiles** (work, personal) - Isolated Claude instances
|
|
415
|
-
5. **Default** - Claude CLI with subscription
|
|
416
|
-
|
|
417
|
-
### Profile Types
|
|
418
|
-
|
|
419
|
-
**CLIProxy**: gemini, codex, agy (v5.0+)
|
|
420
|
-
- OAuth-based authentication via [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI)
|
|
421
|
-
- Browser auth on first run, tokens cached in `~/.ccs/cliproxy/auth/<provider>/`
|
|
422
|
-
- Proxy runs on port 8317, auto-spawned per session
|
|
423
|
-
- Binary: `~/.ccs/cliproxy/bin/cli-proxy-api` (~15MB, auto-downloaded)
|
|
424
|
-
- Model mappings:
|
|
425
|
-
- **Gemini**: gemini-2.5-pro (opus), gemini-2.0-flash (sonnet), flash-lite (haiku)
|
|
426
|
-
- **Codex**: gpt-5.1-codex-max (opus), gpt-4o (sonnet), gpt-4o-mini (haiku)
|
|
427
|
-
- **Antigravity**: agy-pro (sonnet), agy-turbo (haiku)
|
|
428
|
-
|
|
429
|
-
**CLIProxy Variants** (v5.0.2+)
|
|
430
|
-
- User-defined profile names that route through CLIProxy providers
|
|
431
|
-
- Allows multiple model configurations per provider (e.g., `flash` and `pro` for Gemini)
|
|
432
|
-
- Configure in `~/.ccs/config.json` under `cliproxy` section:
|
|
433
|
-
|
|
434
|
-
```json
|
|
435
|
-
{
|
|
436
|
-
"profiles": { ... },
|
|
437
|
-
"cliproxy": {
|
|
438
|
-
"flash": { "provider": "gemini", "settings": "~/.ccs/gemini-flash.settings.json" },
|
|
439
|
-
"pro": { "provider": "gemini", "settings": "~/.ccs/gemini-pro.settings.json" },
|
|
440
|
-
"gpt": { "provider": "codex", "settings": "~/.ccs/codex-gpt.settings.json" }
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
Usage: `ccs flash "quick task"` or `ccs pro "complex analysis"`
|
|
446
|
-
|
|
447
|
-
Settings file format (`~/.ccs/gemini-flash.settings.json`):
|
|
448
|
-
|
|
449
|
-
```json
|
|
450
|
-
{
|
|
451
|
-
"env": {
|
|
452
|
-
"ANTHROPIC_BASE_URL": "http://127.0.0.1:8317/api/provider/gemini",
|
|
453
|
-
"ANTHROPIC_AUTH_TOKEN": "ccs-internal-managed",
|
|
454
|
-
"ANTHROPIC_MODEL": "gemini-2.5-flash",
|
|
455
|
-
"ANTHROPIC_DEFAULT_OPUS_MODEL": "gemini-2.5-flash",
|
|
456
|
-
"ANTHROPIC_DEFAULT_SONNET_MODEL": "gemini-2.5-flash",
|
|
457
|
-
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "gemini-2.5-flash"
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
```
|
|
90
|
+
> **OAuth providers** authenticate via browser on first run. Tokens are cached in `~/.ccs/cliproxy/auth/`.
|
|
461
91
|
|
|
462
92
|
> [!TIP]
|
|
463
|
-
>
|
|
464
|
-
|
|
465
|
-
**Settings-based**: GLM, GLMT, Kimi, default
|
|
466
|
-
- Uses `--settings` flag pointing to config files
|
|
467
|
-
- GLMT: Embedded proxy for thinking mode support
|
|
468
|
-
|
|
469
|
-
**Account-based**: work, personal, team
|
|
470
|
-
- Uses `CLAUDE_CONFIG_DIR` for isolated instances
|
|
471
|
-
- Create with `ccs auth create <profile>`
|
|
472
|
-
|
|
473
|
-
### Shared Data (v4.4+)
|
|
474
|
-
|
|
475
|
-
**Shared across instances** (`~/.ccs/shared/` symlinked to `~/.claude/`):
|
|
476
|
-
- commands/ - Slash commands
|
|
477
|
-
- skills/ - Agent skills
|
|
478
|
-
- agents/ - Agent configs
|
|
479
|
-
- **settings.json** - Claude CLI settings (v4.4+)
|
|
480
|
-
|
|
481
|
-
**Profile-specific**:
|
|
482
|
-
- sessions/ - Conversation history
|
|
483
|
-
- todolists/ - Todo lists
|
|
484
|
-
- logs/ - Execution logs
|
|
485
|
-
- **cliproxy/auth/** - OAuth tokens (CLIProxy profiles only)
|
|
486
|
-
|
|
487
|
-
> [!NOTE]
|
|
488
|
-
> **v4.4 Breaking Change**: settings.json now shared across profiles. Previously each profile had isolated settings. Migration is automatic on install using ~/.claude/settings.json as the authoritative source. Backups created: `<instance>/settings.json.pre-shared-migration`
|
|
489
|
-
|
|
490
|
-
> [!NOTE]
|
|
491
|
-
> **Windows**: Symlink support requires Developer Mode (v4.2 will add copy fallback)
|
|
93
|
+
> **Need more?** CCS supports **any Anthropic-compatible API**. Create custom profiles for self-hosted LLMs, enterprise gateways, or alternative providers. See [API Profiles documentation](https://docs.ccs.kaitran.ca/providers/api-profiles).
|
|
492
94
|
|
|
493
95
|
<br>
|
|
494
96
|
|
|
495
|
-
##
|
|
97
|
+
## Usage
|
|
496
98
|
|
|
497
|
-
|
|
99
|
+
### Basic Commands
|
|
498
100
|
|
|
499
101
|
```bash
|
|
500
|
-
#
|
|
501
|
-
ccs
|
|
502
|
-
|
|
503
|
-
#
|
|
504
|
-
ccs config --port 3000
|
|
505
|
-
|
|
506
|
-
# Access at http://localhost:PORT (shown in output)
|
|
102
|
+
ccs # Default Claude session
|
|
103
|
+
ccs agy # Antigravity (OAuth)
|
|
104
|
+
ccs gemini # Gemini (OAuth)
|
|
105
|
+
ccs glm # GLM (API key)
|
|
507
106
|
```
|
|
508
107
|
|
|
509
|
-
|
|
510
|
-
- 🎨 **Modern UI**: Built with React 19, TypeScript, and shadcn/ui
|
|
511
|
-
- 📊 **Real-time Updates**: WebSocket integration for live status
|
|
512
|
-
- ⚙️ **Profile Management**: Visual configuration of all profiles
|
|
513
|
-
- 🔍 **Health Monitoring**: System diagnostics and metrics
|
|
514
|
-
- 🌙 **Dark Mode**: Eye-friendly theme switching
|
|
515
|
-
- 📱 **Responsive**: Works on desktop and mobile
|
|
108
|
+
### Parallel Workflows
|
|
516
109
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
*(Add screenshots here when available)*
|
|
520
|
-
|
|
521
|
-
## Usage Examples
|
|
522
|
-
|
|
523
|
-
### Basic Switching
|
|
110
|
+
Run multiple terminals with different providers:
|
|
524
111
|
|
|
525
112
|
```bash
|
|
526
|
-
|
|
527
|
-
ccs
|
|
528
|
-
ccs kimi # Kimi (with thinking support)
|
|
529
|
-
```
|
|
113
|
+
# Terminal 1: Planning (Claude Pro)
|
|
114
|
+
ccs work "design the authentication system"
|
|
530
115
|
|
|
531
|
-
|
|
116
|
+
# Terminal 2: Execution (GLM - cost optimized)
|
|
117
|
+
ccs glm "implement the user service from the plan"
|
|
532
118
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
ccs auth create work
|
|
536
|
-
ccs auth create personal
|
|
119
|
+
# Terminal 3: Review (Gemini)
|
|
120
|
+
ccs gemini "review the implementation for security issues"
|
|
537
121
|
```
|
|
538
122
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
```bash
|
|
542
|
-
# Terminal 1 - Work
|
|
543
|
-
ccs work "implement feature"
|
|
544
|
-
|
|
545
|
-
# Terminal 2 - Personal (concurrent)
|
|
546
|
-
ccs personal "review code"
|
|
547
|
-
```
|
|
123
|
+
### Multi-Account Claude
|
|
548
124
|
|
|
549
|
-
|
|
125
|
+
Create isolated Claude instances for work/personal separation:
|
|
550
126
|
|
|
551
127
|
```bash
|
|
552
|
-
ccs
|
|
553
|
-
|
|
128
|
+
ccs auth create work
|
|
129
|
+
|
|
130
|
+
# Run concurrently in separate terminals
|
|
131
|
+
ccs work "implement feature" # Terminal 1
|
|
132
|
+
ccs "review code" # Terminal 2 (personal account)
|
|
554
133
|
```
|
|
555
134
|
|
|
556
135
|
<br>
|
|
557
136
|
|
|
558
|
-
##
|
|
559
|
-
|
|
560
|
-
> [!TIP]
|
|
561
|
-
> **New in v4.0**: Delegate tasks to cost-optimized models (GLM, Kimi) directly from your main Claude session. Save 81% on simple tasks with real-time visibility.
|
|
562
|
-
|
|
563
|
-
### What is Delegation?
|
|
564
|
-
|
|
565
|
-
CCS Delegation lets you **send tasks to alternative models** (`glm`, `kimi`) **from your main Claude session** using the `-p` flag or intelligent slash commands (`/ccs`, `/ccs:continue`).
|
|
566
|
-
|
|
567
|
-
**Why use it?**
|
|
568
|
-
- **Token efficiency**: Simple tasks cost 81% less on GLM vs main Claude session
|
|
569
|
-
- **Context preservation**: Main session stays clean, no pollution from mechanical tasks
|
|
570
|
-
- **Real-time visibility**: See tool usage as tasks execute (`[Tool] Write: index.html`)
|
|
571
|
-
- **Multi-turn support**: Resume sessions with `:continue` for iterative work
|
|
572
|
-
|
|
573
|
-
### Quick Examples
|
|
574
|
-
|
|
575
|
-
**Direct CLI:**
|
|
576
|
-
```bash
|
|
577
|
-
# Delegate simple task to GLM (cost-optimized)
|
|
578
|
-
ccs glm -p "add tests for UserService"
|
|
579
|
-
|
|
580
|
-
# Delegate long-context task to Kimi
|
|
581
|
-
ccs kimi -p "analyze all files in src/ and document architecture"
|
|
582
|
-
|
|
583
|
-
# Continue previous session
|
|
584
|
-
ccs glm:continue -p "run the tests and fix any failures"
|
|
585
|
-
```
|
|
137
|
+
## Maintenance
|
|
586
138
|
|
|
587
|
-
|
|
588
|
-
```bash
|
|
589
|
-
# In your main Claude session:
|
|
590
|
-
/ccs "refactor auth.js to use async/await" # Auto-selects best profile
|
|
591
|
-
/ccs --glm "fix typo in documentation" # Forces GLM profile
|
|
592
|
-
/ccs --kimi "analyze entire architecture" # Forces Kimi profile
|
|
593
|
-
/ccs:continue "also update the README examples" # Continues last session
|
|
594
|
-
```
|
|
139
|
+
### Health Check
|
|
595
140
|
|
|
596
|
-
**Via Natural Language** (Claude auto-delegates):
|
|
597
141
|
```bash
|
|
598
|
-
|
|
599
|
-
"Use ccs glm to add tests for all *.service.js files"
|
|
600
|
-
"Delegate to kimi: analyze project structure"
|
|
142
|
+
ccs doctor
|
|
601
143
|
```
|
|
602
144
|
|
|
603
|
-
|
|
145
|
+
Verifies: Claude CLI, config files, symlinks, permissions.
|
|
604
146
|
|
|
605
|
-
|
|
147
|
+
### Update
|
|
606
148
|
|
|
607
|
-
```
|
|
608
|
-
$ ccs glm -p "/cook create a landing page"
|
|
609
|
-
[i] Delegating to GLM-4.6...
|
|
610
|
-
[Tool] Write: /home/user/project/index.html
|
|
611
|
-
[Tool] Write: /home/user/project/styles.css
|
|
612
|
-
[Tool] Write: /home/user/project/script.js
|
|
613
|
-
[Tool] Edit: /home/user/project/styles.css
|
|
614
|
-
[i] Execution completed in 45.2s
|
|
615
|
-
|
|
616
|
-
╔══════════════════════════════════════════════════════╗
|
|
617
|
-
║ Working Directory: /home/user/project ║
|
|
618
|
-
║ Model: GLM-4.6 ║
|
|
619
|
-
║ Duration: 45.2s ║
|
|
620
|
-
║ Exit Code: 0 ║
|
|
621
|
-
║ Session ID: 3a4f8c21 ║
|
|
622
|
-
║ Total Cost: $0.0015 ║
|
|
623
|
-
║ Turns: 3 ║
|
|
624
|
-
╚══════════════════════════════════════════════════════╝
|
|
625
|
-
```
|
|
626
|
-
|
|
627
|
-
### Advanced Features
|
|
628
|
-
|
|
629
|
-
**Slash Command Support:**
|
|
630
|
-
Delegation preserves custom slash commands in prompts:
|
|
631
149
|
```bash
|
|
632
|
-
ccs
|
|
633
|
-
|
|
150
|
+
ccs update # Update to latest
|
|
151
|
+
ccs update --force # Force reinstall
|
|
152
|
+
ccs update --beta # Install dev channel
|
|
634
153
|
```
|
|
635
154
|
|
|
636
|
-
|
|
637
|
-
Ctrl+C or Esc properly kills delegated processes (no orphans):
|
|
638
|
-
```bash
|
|
639
|
-
# Hit Ctrl+C during delegation
|
|
640
|
-
[!] Parent process terminating, killing delegated session...
|
|
641
|
-
```
|
|
155
|
+
### Sync Shared Items
|
|
642
156
|
|
|
643
|
-
**Time-Based Limits:**
|
|
644
|
-
10-minute default timeout with graceful termination (supports `:continue`):
|
|
645
157
|
```bash
|
|
646
|
-
ccs
|
|
647
|
-
ccs glm:continue -p "pick up where we left off"
|
|
648
|
-
```
|
|
649
|
-
|
|
650
|
-
### Cost Savings Example
|
|
651
|
-
|
|
652
|
-
**Traditional (Main Session):**
|
|
653
|
-
```
|
|
654
|
-
Context load: 2000 tokens
|
|
655
|
-
Discussion: 1500 tokens
|
|
656
|
-
Code gen: 4500 tokens
|
|
657
|
-
─────────────────────────
|
|
658
|
-
Total: 8000 tokens → $0.032
|
|
659
|
-
```
|
|
660
|
-
|
|
661
|
-
**Delegation (GLM):**
|
|
662
|
-
```
|
|
663
|
-
3x tasks via GLM: 1500 tokens → $0.0045
|
|
664
|
-
─────────────────────────────────────────
|
|
665
|
-
Savings: $0.0275 (86% reduction)
|
|
158
|
+
ccs sync
|
|
666
159
|
```
|
|
667
160
|
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
- **Workflow Diagrams**: See [docs/ccs-delegation-diagrams.md](docs/ccs-delegation-diagrams.md) for visual architecture
|
|
671
|
-
- **Skill Reference**: `.claude/skills/ccs-delegation/` for AI decision framework (replaces deprecated agents)
|
|
672
|
-
- **Agent Docs**: `.claude/agents/ccs-delegator.md` was deprecated in v4.3.2, functionality moved to ccs-delegation skill
|
|
673
|
-
|
|
674
|
-
<br>
|
|
675
|
-
|
|
676
|
-
## GLM with Thinking (GLMT)
|
|
677
|
-
|
|
678
|
-
> [!CAUTION]
|
|
679
|
-
> ### NOT PRODUCTION READY - EXPERIMENTAL FEATURE
|
|
680
|
-
>
|
|
681
|
-
> **GLMT is experimental and requires extensive debugging**:
|
|
682
|
-
> - Streaming and tool support still under active development
|
|
683
|
-
> - May experience unexpected errors, timeouts, or incomplete responses
|
|
684
|
-
> - Requires frequent debugging and manual intervention
|
|
685
|
-
> - **Not recommended for critical workflows or production use**
|
|
686
|
-
>
|
|
687
|
-
> **Alternative for GLM Thinking**: Consider going through the **CCR hustle** with the **Transformer of Bedolla** ([ZaiTransformer](https://github.com/Bedolla/ZaiTransformer/)) for a more stable implementation.
|
|
688
|
-
|
|
689
|
-
> [!IMPORTANT]
|
|
690
|
-
> GLMT requires npm installation (`npm install -g @kaitranntt/ccs`). Not available in native shell versions (requires Node.js HTTP server).
|
|
691
|
-
|
|
692
|
-
<br>
|
|
693
|
-
|
|
694
|
-
> [!NOTE]
|
|
695
|
-
> ### Acknowledgments: The Foundation That Made GLMT Possible
|
|
696
|
-
>
|
|
697
|
-
> **CCS's GLMT implementation owes its existence to the groundbreaking work of [@Bedolla](https://github.com/Bedolla)**, who created [ZaiTransformer](https://github.com/Bedolla/ZaiTransformer/) - the **first integration** to bridge [Claude Code Router (CCR)](https://github.com/musistudio/claude-code-router) with Z.AI's reasoning capabilities.
|
|
698
|
-
>
|
|
699
|
-
> **Why this matters**: Before ZaiTransformer, no one had successfully integrated Z.AI's thinking mode with Claude Code's workflow. Bedolla's work wasn't just helpful - it was **foundational**. His implementation of:
|
|
700
|
-
>
|
|
701
|
-
> - **Request/response transformation architecture** - The conceptual blueprint for how to bridge Anthropic and OpenAI formats
|
|
702
|
-
> - **Thinking mode control mechanisms** - The patterns for managing reasoning_content delivery
|
|
703
|
-
> - **Embedded proxy design** - The architecture that CCS's GLMT proxy is built upon
|
|
704
|
-
>
|
|
705
|
-
> These contributions directly inspired and enabled GLMT's design. **Without ZaiTransformer's pioneering work, GLMT wouldn't exist in its current form**. The technical patterns, transformation logic, and proxy architecture implemented in CCS are a direct evolution of the concepts Bedolla first proved viable.
|
|
706
|
-
>
|
|
707
|
-
> **Recognition**: If you benefit from GLMT's thinking capabilities, you're benefiting from Bedolla's vision and engineering. Please consider starring [ZaiTransformer](https://github.com/Bedolla/ZaiTransformer/) to support pioneering work in the Claude Code ecosystem.
|
|
708
|
-
|
|
709
|
-
<br>
|
|
710
|
-
|
|
711
|
-
<details>
|
|
712
|
-
<summary><h3>GLM vs GLMT Comparison</h3></summary>
|
|
713
|
-
|
|
714
|
-
<br>
|
|
715
|
-
|
|
716
|
-
<div align="center">
|
|
717
|
-
|
|
718
|
-
| Feature | GLM (`ccs glm`) | GLMT (`ccs glmt`) |
|
|
719
|
-
|:--------|:----------------|:------------------|
|
|
720
|
-
| **Endpoint** | Anthropic-compatible | OpenAI-compatible |
|
|
721
|
-
| **Thinking** | No | Experimental (`reasoning_content`) |
|
|
722
|
-
| **Tool Support** | Basic | **Unstable (v3.5+)** |
|
|
723
|
-
| **MCP Tools** | Limited | **Buggy (v3.5+)** |
|
|
724
|
-
| **Streaming** | Stable | **Experimental (v3.4+)** |
|
|
725
|
-
| **TTFB** | <500ms | <500ms (sometimes), 2-10s+ (often) |
|
|
726
|
-
| **Use Case** | Reliable work | **Debugging experiments only** |
|
|
727
|
-
|
|
728
|
-
</div>
|
|
729
|
-
|
|
730
|
-
</details>
|
|
731
|
-
|
|
732
|
-
<details>
|
|
733
|
-
<summary><h3>Tool Support (v3.5) - EXPERIMENTAL</h3></summary>
|
|
734
|
-
|
|
735
|
-
<br>
|
|
736
|
-
|
|
737
|
-
**GLMT attempts MCP tools and function calling:**
|
|
738
|
-
|
|
739
|
-
- **Bidirectional Transformation**: Anthropic tools ↔ OpenAI format (unstable)
|
|
740
|
-
- **MCP Integration**: MCP tools sometimes execute (often output XML garbage)
|
|
741
|
-
- **Streaming Tool Calls**: Real-time tool calls (when not crashing)
|
|
742
|
-
- **Backward Compatible**: May break existing thinking support
|
|
743
|
-
- **Configuration Required**: Frequent manual debugging needed
|
|
744
|
-
|
|
745
|
-
</details>
|
|
746
|
-
|
|
747
|
-
<details>
|
|
748
|
-
<summary><h3>Streaming Support (v3.4) - OFTEN FAILS</h3></summary>
|
|
749
|
-
|
|
750
|
-
<br>
|
|
751
|
-
|
|
752
|
-
**GLMT attempts real-time streaming** with incremental reasoning content delivery:
|
|
753
|
-
|
|
754
|
-
- **Default**: Streaming enabled (TTFB <500ms when it works)
|
|
755
|
-
- **Auto-fallback**: Frequently switches to buffered mode due to errors
|
|
756
|
-
- **Thinking parameter**: Claude CLI `thinking` parameter sometimes works
|
|
757
|
-
- May ignore `thinking.type` and `budget_tokens`
|
|
758
|
-
- Precedence: CLI parameter > message tags > default (when not broken)
|
|
759
|
-
|
|
760
|
-
**Status**: Z.AI (tested, tool calls frequently break, requires constant debugging)
|
|
761
|
-
|
|
762
|
-
</details>
|
|
763
|
-
|
|
764
|
-
<details>
|
|
765
|
-
<summary><h3>How It Works (When It Works)</h3></summary>
|
|
766
|
-
|
|
767
|
-
<br>
|
|
768
|
-
|
|
769
|
-
1. CCS spawns embedded HTTP proxy on localhost (if not crashing)
|
|
770
|
-
2. Proxy attempts to convert Anthropic format → OpenAI format (often fails)
|
|
771
|
-
3. Tries to transform Anthropic tools → OpenAI function calling format (buggy)
|
|
772
|
-
4. Forwards to Z.AI with reasoning parameters and tools (when not timing out)
|
|
773
|
-
5. Attempts to convert `reasoning_content` → thinking blocks (partial or broken)
|
|
774
|
-
6. Attempts to convert OpenAI `tool_calls` → Anthropic `tool_use` blocks (XML garbage common)
|
|
775
|
-
7. Thinking and tool calls sometimes appear in Claude Code UI (when not broken)
|
|
776
|
-
|
|
777
|
-
</details>
|
|
778
|
-
|
|
779
|
-
<details>
|
|
780
|
-
<summary><h3>Control Tags & Keywords</h3></summary>
|
|
161
|
+
Re-creates symlinks for shared commands, skills, and settings.
|
|
781
162
|
|
|
782
163
|
<br>
|
|
783
164
|
|
|
784
|
-
|
|
785
|
-
- `<Thinking:On|Off>` - Enable/disable reasoning blocks (default: On)
|
|
786
|
-
- `<Effort:Low|Medium|High>` - Control reasoning depth (deprecated - Z.AI only supports binary thinking)
|
|
165
|
+
## Configuration
|
|
787
166
|
|
|
788
|
-
|
|
789
|
-
- `think` - Sometimes enables reasoning (low effort)
|
|
790
|
-
- `think hard` - Sometimes enables reasoning (medium effort)
|
|
791
|
-
- `think harder` - Sometimes enables reasoning (high effort)
|
|
792
|
-
- `ultrathink` - Attempts maximum reasoning depth (often breaks)
|
|
167
|
+
CCS auto-creates config on install. Dashboard is the recommended way to manage settings.
|
|
793
168
|
|
|
794
|
-
|
|
169
|
+
**Config location**: `~/.ccs/config.yaml`
|
|
795
170
|
|
|
796
171
|
<details>
|
|
797
|
-
<summary
|
|
172
|
+
<summary>Custom Claude CLI path</summary>
|
|
798
173
|
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
**GLMT features** (all experimental):
|
|
802
|
-
- Forced English output enforcement (sometimes works)
|
|
803
|
-
- Random thinking mode activation (unpredictable)
|
|
804
|
-
- Attempted streaming with frequent fallback to buffered mode
|
|
805
|
-
|
|
806
|
-
**General**:
|
|
807
|
-
- `CCS_DEBUG_LOG=1` - Enable debug file logging
|
|
808
|
-
- `CCS_CLAUDE_PATH=/path/to/claude` - Custom Claude CLI path
|
|
809
|
-
|
|
810
|
-
</details>
|
|
811
|
-
|
|
812
|
-
<details>
|
|
813
|
-
<summary><h3>API Key Setup</h3></summary>
|
|
814
|
-
|
|
815
|
-
<br>
|
|
174
|
+
If Claude CLI is installed in a non-standard location:
|
|
816
175
|
|
|
817
176
|
```bash
|
|
818
|
-
#
|
|
819
|
-
|
|
820
|
-
```
|
|
821
|
-
|
|
822
|
-
Set Z.AI API key (requires coding plan):
|
|
823
|
-
|
|
824
|
-
```json
|
|
825
|
-
{
|
|
826
|
-
"env": {
|
|
827
|
-
"ANTHROPIC_AUTH_TOKEN": "your-z-ai-api-key"
|
|
828
|
-
}
|
|
829
|
-
}
|
|
177
|
+
export CCS_CLAUDE_PATH="/path/to/claude" # Unix
|
|
178
|
+
$env:CCS_CLAUDE_PATH = "D:\Tools\Claude\claude.exe" # Windows
|
|
830
179
|
```
|
|
831
180
|
|
|
832
181
|
</details>
|
|
833
182
|
|
|
834
183
|
<details>
|
|
835
|
-
<summary
|
|
836
|
-
|
|
837
|
-
<br>
|
|
838
|
-
|
|
839
|
-
**v3.4 Protection Limits**:
|
|
184
|
+
<summary>Windows symlink support</summary>
|
|
840
185
|
|
|
841
|
-
|
|
842
|
-
|:------|:------|:--------|
|
|
843
|
-
| **SSE buffer** | 1MB max per event | Prevent buffer overflow |
|
|
844
|
-
| **Content buffer** | 10MB max per block | Limit thinking/text blocks |
|
|
845
|
-
| **Content blocks** | 100 max per message | Prevent DoS attacks |
|
|
846
|
-
| **Request timeout** | 120s | Both streaming and buffered |
|
|
186
|
+
Enable Developer Mode for true symlinks:
|
|
847
187
|
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
<summary><h3>Debugging</h3></summary>
|
|
852
|
-
|
|
853
|
-
<br>
|
|
854
|
-
|
|
855
|
-
**Enable verbose logging**:
|
|
856
|
-
```bash
|
|
857
|
-
ccs glmt --verbose "your prompt"
|
|
858
|
-
```
|
|
859
|
-
|
|
860
|
-
**Enable debug file logging**:
|
|
861
|
-
```bash
|
|
862
|
-
export CCS_DEBUG_LOG=1
|
|
863
|
-
ccs glmt --verbose "your prompt"
|
|
864
|
-
# Logs: ~/.ccs/logs/
|
|
865
|
-
```
|
|
866
|
-
|
|
867
|
-
**GLMT debugging**:
|
|
868
|
-
```bash
|
|
869
|
-
# Verbose logging shows streaming status and reasoning details
|
|
870
|
-
ccs glmt --verbose "test"
|
|
871
|
-
```
|
|
872
|
-
|
|
873
|
-
**Check reasoning content**:
|
|
874
|
-
```bash
|
|
875
|
-
cat ~/.ccs/logs/*response-openai.json | jq '.choices[0].message.reasoning_content'
|
|
876
|
-
```
|
|
188
|
+
1. **Settings** → **Privacy & Security** → **For developers**
|
|
189
|
+
2. Enable **Developer Mode**
|
|
190
|
+
3. Reinstall: `npm install -g @kaitranntt/ccs`
|
|
877
191
|
|
|
878
|
-
|
|
879
|
-
- **If absent**: Z.AI API issue (verify key, account status)
|
|
880
|
-
- **If present**: Transformation issue (check `response-anthropic.json`)
|
|
192
|
+
Without Developer Mode, CCS falls back to copying directories.
|
|
881
193
|
|
|
882
194
|
</details>
|
|
883
195
|
|
|
884
196
|
<br>
|
|
885
197
|
|
|
886
|
-
##
|
|
887
|
-
|
|
888
|
-
### Health Check
|
|
889
|
-
|
|
890
|
-
Run diagnostics to verify your CCS installation:
|
|
891
|
-
|
|
892
|
-
```bash
|
|
893
|
-
ccs doctor
|
|
894
|
-
```
|
|
895
|
-
|
|
896
|
-
**Checks performed**:
|
|
897
|
-
- ✓ Claude CLI availability
|
|
898
|
-
- ✓ Configuration files (config.json, profiles)
|
|
899
|
-
- ✓ CCS symlinks to ~/.claude/
|
|
900
|
-
- ✓ Delegation system
|
|
901
|
-
- ✓ File permissions
|
|
902
|
-
|
|
903
|
-
**Output**:
|
|
904
|
-
```
|
|
905
|
-
[?] Checking Claude CLI... [OK]
|
|
906
|
-
[?] Checking ~/.ccs/ directory... [OK]
|
|
907
|
-
[?] Checking config.json... [OK]
|
|
908
|
-
[?] Checking CCS symlinks... [OK]
|
|
909
|
-
...
|
|
910
|
-
Status: Installation healthy
|
|
911
|
-
```
|
|
912
|
-
|
|
913
|
-
### Updating CCS
|
|
914
|
-
|
|
915
|
-
```bash
|
|
916
|
-
# Update to latest stable version
|
|
917
|
-
ccs update
|
|
918
|
-
|
|
919
|
-
# Force reinstall (fix corrupted installation)
|
|
920
|
-
ccs update --force
|
|
198
|
+
## Documentation
|
|
921
199
|
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
If you modify CCS items or need to re-install symlinks:
|
|
934
|
-
|
|
935
|
-
```bash
|
|
936
|
-
ccs sync
|
|
937
|
-
```
|
|
938
|
-
|
|
939
|
-
**What it does**:
|
|
940
|
-
- Re-creates selective symlinks from `~/.ccs/.claude/` to `~/.claude/`
|
|
941
|
-
- Backs up existing files before replacing
|
|
942
|
-
- Safe to run multiple times (idempotent)
|
|
943
|
-
|
|
944
|
-
**When to use**:
|
|
945
|
-
- After manual modifications to ~/.claude/
|
|
946
|
-
- If `ccs doctor` reports symlink issues
|
|
947
|
-
- After upgrading CCS to a new version
|
|
948
|
-
|
|
949
|
-
<br>
|
|
950
|
-
|
|
951
|
-
### Troubleshooting
|
|
952
|
-
|
|
953
|
-
#### Broken Installation
|
|
954
|
-
|
|
955
|
-
If CCS is corrupted or behaving unexpectedly:
|
|
956
|
-
|
|
957
|
-
```bash
|
|
958
|
-
# Force reinstall to fix
|
|
959
|
-
ccs update --force
|
|
960
|
-
```
|
|
961
|
-
|
|
962
|
-
If that doesn't work, try manual reinstall:
|
|
963
|
-
|
|
964
|
-
```bash
|
|
965
|
-
npm install -g @kaitranntt/ccs@latest --force
|
|
966
|
-
```
|
|
967
|
-
|
|
968
|
-
#### Beta Testing Issues
|
|
969
|
-
|
|
970
|
-
If you're on the dev channel and experiencing issues:
|
|
971
|
-
|
|
972
|
-
```bash
|
|
973
|
-
# Return to stable channel
|
|
974
|
-
ccs update
|
|
975
|
-
```
|
|
976
|
-
|
|
977
|
-
#### Common Issues
|
|
978
|
-
|
|
979
|
-
- **Update fails**: Check network connection and try `ccs update --force`
|
|
980
|
-
- **Beta not working**: Use `ccs update` to return to stable version
|
|
981
|
-
- **Direct install error**: Beta channel requires npm installation
|
|
982
|
-
|
|
983
|
-
For detailed troubleshooting, see [Troubleshooting Guide](./docs/en/troubleshooting.md).
|
|
200
|
+
| Topic | Link |
|
|
201
|
+
|-------|------|
|
|
202
|
+
| Installation | [docs.ccs.kaitran.ca/getting-started/installation](https://docs.ccs.kaitran.ca/getting-started/installation) |
|
|
203
|
+
| Configuration | [docs.ccs.kaitran.ca/getting-started/configuration](https://docs.ccs.kaitran.ca/getting-started/configuration) |
|
|
204
|
+
| OAuth Providers | [docs.ccs.kaitran.ca/providers/oauth-providers](https://docs.ccs.kaitran.ca/providers/oauth-providers) |
|
|
205
|
+
| Multi-Account Claude | [docs.ccs.kaitran.ca/providers/claude-accounts](https://docs.ccs.kaitran.ca/providers/claude-accounts) |
|
|
206
|
+
| API Profiles | [docs.ccs.kaitran.ca/providers/api-profiles](https://docs.ccs.kaitran.ca/providers/api-profiles) |
|
|
207
|
+
| CLI Reference | [docs.ccs.kaitran.ca/reference/cli-commands](https://docs.ccs.kaitran.ca/reference/cli-commands) |
|
|
208
|
+
| Architecture | [docs.ccs.kaitran.ca/reference/architecture](https://docs.ccs.kaitran.ca/reference/architecture) |
|
|
209
|
+
| Troubleshooting | [docs.ccs.kaitran.ca/reference/troubleshooting](https://docs.ccs.kaitran.ca/reference/troubleshooting) |
|
|
984
210
|
|
|
985
211
|
<br>
|
|
986
212
|
|
|
987
213
|
## Uninstall
|
|
988
214
|
|
|
989
|
-
### npm (Recommended)
|
|
990
|
-
|
|
991
215
|
```bash
|
|
992
216
|
npm uninstall -g @kaitranntt/ccs
|
|
993
217
|
```
|
|
994
218
|
|
|
995
219
|
<details>
|
|
996
|
-
<summary
|
|
997
|
-
|
|
998
|
-
<br>
|
|
220
|
+
<summary>Alternative package managers</summary>
|
|
999
221
|
|
|
1000
222
|
```bash
|
|
1001
|
-
# yarn
|
|
1002
223
|
yarn global remove @kaitranntt/ccs
|
|
1003
|
-
|
|
1004
|
-
# pnpm
|
|
1005
224
|
pnpm remove -g @kaitranntt/ccs
|
|
1006
|
-
|
|
1007
|
-
# bun
|
|
1008
225
|
bun remove -g @kaitranntt/ccs
|
|
1009
226
|
```
|
|
1010
227
|
|
|
1011
228
|
</details>
|
|
1012
229
|
|
|
1013
|
-
<details>
|
|
1014
|
-
<summary><strong>Legacy Uninstallers (for native installs)</strong></summary>
|
|
1015
|
-
|
|
1016
|
-
<br>
|
|
1017
|
-
|
|
1018
|
-
```bash
|
|
1019
|
-
# macOS / Linux
|
|
1020
|
-
curl -fsSL ccs.kaitran.ca/uninstall | bash
|
|
1021
|
-
|
|
1022
|
-
# Windows PowerShell
|
|
1023
|
-
irm ccs.kaitran.ca/uninstall | iex
|
|
1024
|
-
```
|
|
1025
|
-
|
|
1026
|
-
</details>
|
|
1027
|
-
|
|
1028
230
|
<br>
|
|
1029
231
|
|
|
1030
|
-
##
|
|
232
|
+
## Philosophy
|
|
1031
233
|
|
|
1032
234
|
- **YAGNI**: No features "just in case"
|
|
1033
|
-
- **KISS**: Simple
|
|
235
|
+
- **KISS**: Simple, focused implementation
|
|
1034
236
|
- **DRY**: One source of truth (config)
|
|
1035
237
|
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
**Complete documentation in [docs/](./docs/)**:
|
|
1039
|
-
- [Installation Guide](./docs/en/installation.md)
|
|
1040
|
-
- [Configuration](./docs/en/configuration.md)
|
|
1041
|
-
- [Usage Examples](./docs/en/usage.md)
|
|
1042
|
-
- [System Architecture](./docs/system-architecture.md)
|
|
1043
|
-
- [GLMT Control Mechanisms](./docs/glmt-controls.md)
|
|
1044
|
-
- [Troubleshooting](./docs/en/troubleshooting.md)
|
|
1045
|
-
- [Contributing](./CONTRIBUTING.md)
|
|
1046
|
-
|
|
1047
|
-
## 🤝 Contributing
|
|
1048
|
-
|
|
1049
|
-
We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
## Star History
|
|
1053
|
-
|
|
1054
|
-
<div align="center">
|
|
238
|
+
<br>
|
|
1055
239
|
|
|
1056
|
-
|
|
240
|
+
## Contributing
|
|
1057
241
|
|
|
1058
|
-
|
|
242
|
+
See [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|
1059
243
|
|
|
244
|
+
<br>
|
|
1060
245
|
|
|
1061
246
|
## License
|
|
1062
247
|
|
|
1063
|
-
|
|
248
|
+
MIT License - see [LICENSE](LICENSE).
|
|
1064
249
|
|
|
1065
250
|
<div align="center">
|
|
1066
251
|
|
|
1067
|
-
|
|
252
|
+
---
|
|
1068
253
|
|
|
1069
|
-
[
|
|
254
|
+
**[ccs.kaitran.ca](https://ccs.kaitran.ca)** | [Report Issues](https://github.com/kaitranntt/ccs/issues) | [Star on GitHub](https://github.com/kaitranntt/ccs)
|
|
1070
255
|
|
|
1071
256
|
</div>
|