@kaitranntt/ccs 3.4.5 → 3.5.0

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 CHANGED
@@ -1,12 +1,12 @@
1
- # CCS - Claude Code Switch
2
-
3
1
  <div align="center">
4
2
 
3
+ # CCS - Claude Code Switch
4
+
5
5
  ![CCS Logo](docs/assets/ccs-logo-medium.png)
6
6
 
7
- **One command, zero downtime, multiple accounts**
7
+ ### One command, zero downtime, multiple accounts
8
8
 
9
- Switch between multiple Claude accounts, GLM, and Kimi instantly.<br>
9
+ **Switch between multiple Claude accounts, GLM, and Kimi instantly.**<br>
10
10
  Stop hitting rate limits. Keep working continuously.
11
11
 
12
12
 
@@ -19,27 +19,20 @@ Stop hitting rate limits. Keep working continuously.
19
19
 
20
20
  </div>
21
21
 
22
- ---
23
-
24
- ## 🚀 Quick Start
22
+ <br>
25
23
 
26
- ### 🔑 Prerequisites
27
-
28
- **Before installing CCS, make sure you're logged into Claude CLI with your subscription account:**
29
- ```bash
30
- claude /login
31
- ```
24
+ ## Quick Start
32
25
 
33
26
  ### Installation
34
27
 
35
- #### Option 1: npm Package (Recommended)
28
+ **npm Package (Recommended)**
36
29
 
37
30
  **macOS / Linux / Windows**
38
31
  ```bash
39
32
  npm install -g @kaitranntt/ccs
40
33
  ```
41
34
 
42
- All major package managers are supported:
35
+ **All major package managers are supported:**
43
36
 
44
37
  ```bash
45
38
  # yarn
@@ -52,7 +45,10 @@ pnpm add -g @kaitranntt/ccs
52
45
  bun add -g @kaitranntt/ccs
53
46
  ```
54
47
 
55
- #### Option 2: Direct Install (Traditional)
48
+ <details>
49
+ <summary><strong>Alternative: Direct Install (Traditional)</strong></summary>
50
+
51
+ <br>
56
52
 
57
53
  **macOS / Linux**
58
54
  ```bash
@@ -64,7 +60,11 @@ curl -fsSL ccs.kaitran.ca/install | bash
64
60
  irm ccs.kaitran.ca/install | iex
65
61
  ```
66
62
 
67
- > **💡 Performance Tip**: Traditional installs bypass Node.js routing for faster startup, but I prioritize npm updates due to easier deployment automation.
63
+ **Note:** Traditional installs bypass Node.js routing for faster startup, but npm is prioritized for easier deployment automation.
64
+
65
+ </details>
66
+
67
+ <br>
68
68
 
69
69
  ### Configuration (Auto-created)
70
70
 
@@ -82,7 +82,10 @@ irm ccs.kaitran.ca/install | iex
82
82
  }
83
83
  ```
84
84
 
85
- ### Custom Claude CLI Path
85
+ <details>
86
+ <summary><h3>Custom Claude CLI Path</h3></summary>
87
+
88
+ <br>
86
89
 
87
90
  If Claude CLI is installed in a non-standard location (D drive, custom directory), set `CCS_CLAUDE_PATH`:
88
91
 
@@ -91,9 +94,14 @@ export CCS_CLAUDE_PATH="/path/to/claude" # Unix
91
94
  $env:CCS_CLAUDE_PATH = "D:\Tools\Claude\claude.exe" # Windows
92
95
  ```
93
96
 
94
- **See [Troubleshooting Guide](./docs/en/troubleshooting.md#claude-cli-in-non-standard-location) for detailed setup instructions.**
97
+ **See also:** [Troubleshooting Guide](./docs/en/troubleshooting.md#claude-cli-in-non-standard-location) for detailed setup instructions.
98
+
99
+ </details>
100
+
101
+ <details>
102
+ <summary><h3>Windows Symlink Support (Developer Mode)</h3></summary>
95
103
 
96
- ### Windows Symlink Support (Developer Mode)
104
+ <br>
97
105
 
98
106
  **Windows users**: Enable Developer Mode for true symlinks (better performance, instant sync):
99
107
 
@@ -101,60 +109,175 @@ $env:CCS_CLAUDE_PATH = "D:\Tools\Claude\claude.exe" # Windows
101
109
  2. Enable **Developer Mode**
102
110
  3. Reinstall CCS: `npm install -g @kaitranntt/ccs`
103
111
 
104
- **Without Developer Mode**: CCS automatically falls back to copying directories (works but no instant sync across profiles).
112
+ **Warning:** Without Developer Mode, CCS automatically falls back to copying directories (works but no instant sync across profiles).
105
113
 
106
- ---
114
+ </details>
115
+
116
+ <br>
107
117
 
108
118
  ### Your First Switch
109
119
 
110
- > **⚠️ Important**: Before using GLM/GLMT or Kimi profiles, update API keys in settings files:
111
- > - **GLM**: Edit `~/.ccs/glm.settings.json` and add your GLM API key
112
- > - **GLMT**: Edit `~/.ccs/glmt.settings.json` and add your Z.AI API key (requires coding plan)
120
+ > [!IMPORTANT]
121
+ > **Before using alternative models, update API keys in settings files:**
122
+ >
123
+ > - **GLM**: Edit `~/.ccs/glm.settings.json` and add your Z.AI Coding Plan API Key
124
+ > - **GLMT**: Edit `~/.ccs/glmt.settings.json` and add your Z.AI Coding Plan API Key
113
125
  > - **Kimi**: Edit `~/.ccs/kimi.settings.json` and add your Kimi API key
114
126
 
127
+ <br>
128
+
129
+ **Parallel Workflow: Planning + Execution**
130
+
115
131
  ```bash
116
- # Default Claude subscription
117
- ccs "Plan microservices architecture"
132
+ # Terminal 1 - Planning (Claude Sonnet)
133
+ ccs "Plan a REST API with authentication and rate limiting"
134
+
135
+ # Terminal 2 - Execution (GLM, cost-optimized)
136
+ ccs glm "Implement the user authentication endpoints from the plan"
137
+ ```
138
+
139
+ <details>
140
+ <summary><strong>Thinking Models (Kimi & GLMT)</strong></summary>
118
141
 
119
- # Switch to GLM (cost-optimized)
120
- ccs glm "Create REST API"
142
+ <br>
121
143
 
122
- # GLM with thinking mode
123
- ccs glmt "Solve algorithmic problem"
144
+ ```bash
145
+ # Kimi - Stable thinking support
146
+ ccs kimi "Design a caching strategy with trade-off analysis"
124
147
 
125
- # Kimi for coding
126
- ccs kimi "Write integration tests"
148
+ # GLMT - Experimental (see full disclaimer below)
149
+ ccs glmt "Debug complex algorithm with reasoning steps"
127
150
  ```
128
151
 
129
- ---
152
+ **Note:** GLMT is experimental and unstable. See [GLM with Thinking (GLMT)](#glm-with-thinking-glmt) section below for full details.
153
+
154
+ </details>
155
+
156
+ <br>
130
157
 
131
158
  ## The Daily Developer Pain Point
132
159
 
133
- Developers face multiple subscription scenarios daily:
160
+ <div align="center">
161
+
162
+ ### **STOP Switching. START Orchestrating.**
163
+
164
+ **Session limits shouldn't kill your flow state.**
165
+ </div>
166
+
167
+ You're deep in implementation. Context loaded. Solution crystallizing.<br>
168
+ Then: 🔴 _"You've reached your usage limit."_
169
+
170
+ **Momentum gone. Context lost. Productivity crater.**
171
+
172
+ ## **The Solution: Parallel Workflows**
173
+
174
+ <details>
175
+ <summary><strong>❌ OLD WAY:</strong> Switch When You Hit Limits (Reactive)</summary>
176
+
177
+ ### Your Current Workflow:
178
+ - **2pm:** Building features, in the zone
179
+ - **3pm:** 🔴 Usage limit hit
180
+ - **3:05pm:** Stop work, edit `~/.claude/settings.json`
181
+ - **3:15pm:** Switch accounts, lose context
182
+ - **3:30pm:** Try to get back in flow state
183
+ - **4pm:** Finally productive again
184
+
185
+ - **Result:** 1 hour lost, momentum destroyed, frustration builds
186
+
187
+ </details>
188
+
189
+ <details open>
190
+ <summary><strong>✨ NEW WAY:</strong> Run Parallel From Start (Proactive) - <strong>RECOMMENDED</strong></summary>
191
+
192
+ ### Your New Workflow:
193
+ - **2pm:** **Terminal 1:** `ccs "Plan the API architecture"` → Strategic thinking (Claude Pro)
194
+ - **2pm:** **Terminal 2:** `ccs glm "Implement the endpoints"` → Code execution (GLM)
195
+ - **3pm:** Still shipping, no interruptions
196
+ - **4pm:** Flow state achieved, productivity spiking
197
+ - **5pm:** Features shipped, context maintained
198
+
199
+ - **Result:** Zero downtime, continuous productivity, less frustration
200
+
201
+ ### 💰 **The Value Proposition:**
202
+ - **Setup:** Your existing Claude Pro + GLM Lite (cost-effective add-on)
203
+ - **Value:** Save 1 hour/day × 20 workdays = 20 hours/month recovered
204
+ - **ROI:** Your development time is worth more than the setup cost
205
+ - **Reality:** Shipping faster than the overhead
206
+
207
+ </details>
208
+
209
+ ## Choose Your Path
210
+
211
+ <details>
212
+ <summary><strong>Budget-Focused:</strong> GLM Only</summary>
213
+
214
+ - **Best for:** Cost-conscious development, basic code generation
215
+ - **Usage:** Just use `ccs glm` directly for cost-effective AI assistance
216
+ - **Reality:** No Claude access, but capable for many coding tasks
217
+ - **Setup:** GLM API key only, very affordable
218
+
219
+ </details>
134
220
 
135
- 1. **Account Separation**: Company Claude account vs personal Claude → you must manually switch contexts to keep work and personal separate
136
- 2. **Rate Limits Hit**: Claude stops mid-project you manually edit `~/.claude/settings.json`
137
- 3. **Cost Management**: 2-3 Pro subscriptions ($20/month each) vs Claude Max at 5x cost ($100/month) → Pro tier is the practical ceiling for most developers
138
- 4. **Model Choice**: Different tasks benefit from different model strengths → manual switching
221
+ <details open>
222
+ <summary><strong>✨ Recommended for Daily Development:</strong> 1 Claude Pro + 1 GLM Lite</summary>
139
223
 
140
- Manual context switching breaks your workflow. **CCS manages it seamlessly**.
224
+ - **Best for:** Daily code delivery, serious development work
225
+ - **Usage:** `ccs` for planning + `ccs glm` for execution (parallel workflow)
226
+ - **Reality:** Perfect balance of capability and cost for most developers
227
+ - **Value:** Never hit session limits, continuous productivity
228
+
229
+ </details>
230
+
231
+ <details>
232
+ <summary><strong>Power User:</strong> Multiple Claude Pro + GLM Pro</summary>
233
+
234
+ - **Best for:** Heavy workloads, concurrent projects, solo dev
235
+ - **Unlocks:** Never drain session or weekly limits
236
+ - **Workflow:** 3+ terminals running specialized tasks simultaneously
237
+
238
+ </details>
239
+
240
+ <details>
241
+ <summary><strong>Privacy-Focused:</strong> Work/Personal Isolation</summary>
242
+
243
+ - **When needed:** Strict separation of work and personal AI contexts
244
+ - **Setup:** `ccs auth create work` + `ccs auth create personal`
245
+ - **Note:** Advanced feature - most users don't need this
246
+
247
+ </details>
248
+
249
+ ---
141
250
 
142
251
  ## Why CCS Instead of Manual Switching?
143
252
 
144
253
  <div align="center">
145
254
 
146
- | Feature | Benefit |
147
- |---------|---------|
148
- | **Account Isolation** | Keep work separate from personal |
149
- | **Cost Optimization** | 2-3 Pro accounts vs Max at 5x cost |
150
- | **Instant Switching** | One command, no file editing |
151
- | **Zero Downtime** | Never interrupt workflow |
152
- | **Rate Limit Management** | Switch accounts when limits hit |
153
- | **Cross-Platform** | macOS, Linux, Windows |
255
+ **CCS isn't about "switching when you hit limits at 3pm."**
256
+
257
+ ## **It's about running in parallel from the start.**
154
258
 
155
259
  </div>
156
260
 
157
- ---
261
+ ### The Core Difference
262
+
263
+ | **Manual Switching** | **CCS Orchestration** |
264
+ |:---|:---|
265
+ | 🔴 Hit limits → Stop work → Edit config files → Restart | ✅ Multiple terminals running different models from the start |
266
+ | 😰 Context loss and flow state interruption | 😌 Continuous productivity with preserved context |
267
+ | 📝 Sequential task handling | ⚡ Parallel workflows (planning + execution simultaneously) |
268
+ | 🛠️ Reactive problem solving when blocked | 🎯 Proactive workflow design prevents blocks |
269
+
270
+ ### What CCS Gives You
271
+
272
+ - **Zero Context Switching**: Keep your flow state without interruption
273
+ - **Parallel Productivity**: Strategic planning in one terminal, code execution in another
274
+ - **Instant Account Management**: One command switches, no config file editing
275
+ - **Work-Life Separation**: Isolate contexts without logging out
276
+ - **Cross-Platform Consistency**: Same smooth experience on macOS, Linux, Windows
277
+
278
+ **Manual context switching breaks workflow. CCS orchestrates seamlessly.**
279
+
280
+ <br>
158
281
 
159
282
  ## Architecture
160
283
 
@@ -170,9 +293,9 @@ Manual context switching breaks your workflow. **CCS manages it seamlessly**.
170
293
 
171
294
  ### Shared Data (v3.1)
172
295
 
173
- Commands and skills symlinked from `~/.ccs/shared/` - no duplication across profiles.
296
+ Commands and skills symlinked from `~/.ccs/shared/` - **no duplication across profiles**.
174
297
 
175
- ```
298
+ ```plaintext
176
299
  ~/.ccs/
177
300
  ├── shared/ # Shared across all profiles
178
301
  │ ├── agents/
@@ -184,24 +307,77 @@ Commands and skills symlinked from `~/.ccs/shared/` - no duplication across prof
184
307
  │ ├── commands@ → shared/commands/
185
308
  │ ├── skills@ → shared/skills/
186
309
  │ ├── settings.json # API keys, credentials
187
- └── sessions/ # Conversation history
310
+ ├── sessions/ # Conversation history
188
311
  │ └── ...
189
312
  ```
190
313
 
191
- **Shared**: commands/, skills/, agents/
192
- **Profile-specific**: settings.json, sessions/, todolists/, logs/
314
+ | Type | Files |
315
+ |:-----|:------|
316
+ | **Shared** | `commands/`, `skills/`, `agents/` |
317
+ | **Profile-specific** | `settings.json`, `sessions/`, `todolists/`, `logs/` |
193
318
 
194
- **[i] Windows**: Copies dirs if symlinks unavailable (enable Developer Mode for true symlinks)
319
+ > [!NOTE]
320
+ > **Windows**: Copies directories if symlinks unavailable (enable Developer Mode for true symlinks)
195
321
 
196
- ---
322
+ <br>
323
+
324
+ ## Usage Examples
325
+
326
+ ### Basic Switching
327
+
328
+ ```bash
329
+ ccs # Claude subscription (default)
330
+ ccs glm # GLM (cost-optimized)
331
+ ccs kimi # Kimi (with thinking support)
332
+ ```
333
+
334
+ ### Multi-Account Setup
335
+
336
+ ```bash
337
+ # Create accounts
338
+ ccs auth create work
339
+ ccs auth create personal
340
+ ```
341
+
342
+ **Run concurrently in separate terminals:**
343
+
344
+ ```bash
345
+ # Terminal 1 - Work
346
+ ccs work "implement feature"
347
+
348
+ # Terminal 2 - Personal (concurrent)
349
+ ccs personal "review code"
350
+ ```
351
+
352
+ ### Help & Version
353
+
354
+ ```bash
355
+ ccs --version # Show version
356
+ ccs --help # Show all commands and options
357
+ ```
358
+
359
+ <br>
197
360
 
198
361
  ## GLM with Thinking (GLMT)
199
362
 
200
- > **[!] Important**: GLMT requires npm installation (`npm install -g @kaitranntt/ccs`). Not available in native shell versions (requires Node.js HTTP server).
363
+ > [!CAUTION]
364
+ > ### NOT PRODUCTION READY - EXPERIMENTAL FEATURE
365
+ >
366
+ > **GLMT is experimental and requires extensive debugging**:
367
+ > - Streaming and tool support still under active development
368
+ > - May experience unexpected errors, timeouts, or incomplete responses
369
+ > - Requires frequent debugging and manual intervention
370
+ > - **Not recommended for critical workflows or production use**
371
+ >
372
+ > **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.
373
+
374
+ > [!IMPORTANT]
375
+ > GLMT requires npm installation (`npm install -g @kaitranntt/ccs`). Not available in native shell versions (requires Node.js HTTP server).
201
376
 
202
- ### Acknowledgments: The Foundation That Made GLMT Possible
377
+ <br>
203
378
 
204
- > **[i] Pioneering Work by [@Bedolla](https://github.com/Bedolla)**
379
+ > [!NOTE]
380
+ > ### Acknowledgments: The Foundation That Made GLMT Possible
205
381
  >
206
382
  > **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.
207
383
  >
@@ -215,81 +391,122 @@ Commands and skills symlinked from `~/.ccs/shared/` - no duplication across prof
215
391
  >
216
392
  > **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.
217
393
 
218
- ---
394
+ <br>
395
+
396
+ <details>
397
+ <summary><h3>GLM vs GLMT Comparison</h3></summary>
398
+
399
+ <br>
219
400
 
220
- ### GLM vs GLMT
401
+ <div align="center">
221
402
 
222
403
  | Feature | GLM (`ccs glm`) | GLMT (`ccs glmt`) |
223
- |---------|-----------------|-------------------|
404
+ |:--------|:----------------|:------------------|
224
405
  | **Endpoint** | Anthropic-compatible | OpenAI-compatible |
225
- | **Thinking** | No | Yes (reasoning_content) |
226
- | **Tool Support** | Basic | **Full (v3.5+)** |
227
- | **MCP Tools** | Limited | **Working (v3.5+)** |
228
- | **Streaming** | Yes | **Yes (v3.4+)** |
229
- | **TTFB** | <500ms | <500ms (streaming), 2-10s (buffered) |
230
- | **Use Case** | Fast responses | Complex reasoning + tools |
406
+ | **Thinking** | No | Experimental (`reasoning_content`) |
407
+ | **Tool Support** | Basic | **Unstable (v3.5+)** |
408
+ | **MCP Tools** | Limited | **Buggy (v3.5+)** |
409
+ | **Streaming** | Stable | **Experimental (v3.4+)** |
410
+ | **TTFB** | <500ms | <500ms (sometimes), 2-10s+ (often) |
411
+ | **Use Case** | Reliable work | **Debugging experiments only** |
412
+
413
+ </div>
414
+
415
+ </details>
416
+
417
+ <details>
418
+ <summary><h3>Tool Support (v3.5) - EXPERIMENTAL</h3></summary>
419
+
420
+ <br>
231
421
 
232
- ### Tool Support (v3.5)
422
+ **GLMT attempts MCP tools and function calling:**
233
423
 
234
- **GLMT now fully supports MCP tools and function calling**:
424
+ - **Bidirectional Transformation**: Anthropic tools OpenAI format (unstable)
425
+ - **MCP Integration**: MCP tools sometimes execute (often output XML garbage)
426
+ - **Streaming Tool Calls**: Real-time tool calls (when not crashing)
427
+ - **Backward Compatible**: May break existing thinking support
428
+ - **Configuration Required**: Frequent manual debugging needed
235
429
 
236
- - **Bidirectional Transformation**: Anthropic tools ↔ OpenAI function calling
237
- - **MCP Integration**: MCP tools execute correctly (no XML tag output)
238
- - **Streaming Tool Calls**: Real-time tool calls with input_json deltas
239
- - **Backward Compatible**: Works seamlessly with existing thinking support
240
- - **No Configuration**: Tool support works automatically
430
+ </details>
241
431
 
242
- ### Streaming Support (v3.4)
432
+ <details>
433
+ <summary><h3>Streaming Support (v3.4) - OFTEN FAILS</h3></summary>
243
434
 
244
- **GLMT now supports real-time streaming** with incremental reasoning content delivery.
435
+ <br>
245
436
 
246
- - **Default**: Streaming enabled (TTFB <500ms)
247
- - **Disable**: Set `CCS_GLMT_STREAMING=disabled` for buffered mode
248
- - **Force**: Set `CCS_GLMT_STREAMING=force` to override client preferences
249
- - **Thinking parameter**: Claude CLI `thinking` parameter support
250
- - Respects `thinking.type` and `budget_tokens`
251
- - Precedence: CLI parameter > message tags > default
437
+ **GLMT attempts real-time streaming** with incremental reasoning content delivery:
252
438
 
253
- **Confirmed working**: Z.AI (1498 reasoning chunks tested, tool calls verified)
439
+ - **Default**: Streaming enabled (TTFB <500ms when it works)
440
+ - **Auto-fallback**: Frequently switches to buffered mode due to errors
441
+ - **Thinking parameter**: Claude CLI `thinking` parameter sometimes works
442
+ - May ignore `thinking.type` and `budget_tokens`
443
+ - Precedence: CLI parameter > message tags > default (when not broken)
254
444
 
255
- ### How It Works
445
+ **Status**: Z.AI (tested, tool calls frequently break, requires constant debugging)
256
446
 
257
- 1. CCS spawns embedded HTTP proxy on localhost
258
- 2. Proxy converts Anthropic format → OpenAI format (streaming or buffered)
259
- 3. Transforms Anthropic tools → OpenAI function calling format
260
- 4. Forwards to Z.AI with reasoning parameters and tools
261
- 5. Converts `reasoning_content` → thinking blocks (incremental or complete)
262
- 6. Converts OpenAI `tool_calls` → Anthropic tool_use blocks
263
- 7. Thinking and tool calls appear in Claude Code UI in real-time
447
+ </details>
264
448
 
265
- ### Control Tags
449
+ <details>
450
+ <summary><h3>How It Works (When It Works)</h3></summary>
266
451
 
452
+ <br>
453
+
454
+ 1. CCS spawns embedded HTTP proxy on localhost (if not crashing)
455
+ 2. Proxy attempts to convert Anthropic format → OpenAI format (often fails)
456
+ 3. Tries to transform Anthropic tools → OpenAI function calling format (buggy)
457
+ 4. Forwards to Z.AI with reasoning parameters and tools (when not timing out)
458
+ 5. Attempts to convert `reasoning_content` → thinking blocks (partial or broken)
459
+ 6. Attempts to convert OpenAI `tool_calls` → Anthropic `tool_use` blocks (XML garbage common)
460
+ 7. Thinking and tool calls sometimes appear in Claude Code UI (when not broken)
461
+
462
+ </details>
463
+
464
+ <details>
465
+ <summary><h3>Control Tags & Keywords</h3></summary>
466
+
467
+ <br>
468
+
469
+ **Control Tags**:
267
470
  - `<Thinking:On|Off>` - Enable/disable reasoning blocks (default: On)
268
471
  - `<Effort:Low|Medium|High>` - Control reasoning depth (deprecated - Z.AI only supports binary thinking)
269
472
 
270
- ### Environment Variables
473
+ **Thinking Keywords** (inconsistent activation):
474
+ - `think` - Sometimes enables reasoning (low effort)
475
+ - `think hard` - Sometimes enables reasoning (medium effort)
476
+ - `think harder` - Sometimes enables reasoning (high effort)
477
+ - `ultrathink` - Attempts maximum reasoning depth (often breaks)
478
+
479
+ </details>
271
480
 
272
- **GLMT-specific**:
273
- - `CCS_GLMT_FORCE_ENGLISH=true` - Force English output (default: true)
274
- - `CCS_GLMT_THINKING_BUDGET=8192` - Control thinking on/off based on task type
275
- - 0 or "unlimited": Always enable thinking
276
- - 1-2048: Disable thinking (fast execution)
277
- - 2049-8192: Enable for reasoning tasks only (default)
278
- - >8192: Always enable thinking
279
- - `CCS_GLMT_STREAMING=disabled` - Force buffered mode
280
- - `CCS_GLMT_STREAMING=force` - Force streaming (override client)
481
+ <details>
482
+ <summary><h3>Environment Variables</h3></summary>
483
+
484
+ <br>
485
+
486
+ **GLMT features** (all experimental):
487
+ - Forced English output enforcement (sometimes works)
488
+ - Random thinking mode activation (unpredictable)
489
+ - Attempted streaming with frequent fallback to buffered mode
281
490
 
282
491
  **General**:
283
492
  - `CCS_DEBUG_LOG=1` - Enable debug file logging
284
493
  - `CCS_CLAUDE_PATH=/path/to/claude` - Custom Claude CLI path
285
494
 
286
- ### API Key Setup
495
+ </details>
496
+
497
+ <details>
498
+ <summary><h3>API Key Setup</h3></summary>
499
+
500
+ <br>
287
501
 
288
502
  ```bash
289
503
  # Edit GLMT settings
290
504
  nano ~/.ccs/glmt.settings.json
505
+ ```
506
+
507
+ Set Z.AI API key (requires coding plan):
291
508
 
292
- # Set Z.AI API key (requires coding plan)
509
+ ```json
293
510
  {
294
511
  "env": {
295
512
  "ANTHROPIC_AUTH_TOKEN": "your-z-ai-api-key"
@@ -297,15 +514,28 @@ nano ~/.ccs/glmt.settings.json
297
514
  }
298
515
  ```
299
516
 
300
- ### Security Limits
517
+ </details>
518
+
519
+ <details>
520
+ <summary><h3>Security Limits (DoS Protection)</h3></summary>
521
+
522
+ <br>
523
+
524
+ **v3.4 Protection Limits**:
525
+
526
+ | Limit | Value | Purpose |
527
+ |:------|:------|:--------|
528
+ | **SSE buffer** | 1MB max per event | Prevent buffer overflow |
529
+ | **Content buffer** | 10MB max per block | Limit thinking/text blocks |
530
+ | **Content blocks** | 100 max per message | Prevent DoS attacks |
531
+ | **Request timeout** | 120s | Both streaming and buffered |
532
+
533
+ </details>
301
534
 
302
- **DoS protection** (v3.4):
303
- - SSE buffer: 1MB max per event
304
- - Content buffer: 10MB max per block (thinking/text)
305
- - Content blocks: 100 max per message
306
- - Request timeout: 120s (both streaming and buffered)
535
+ <details>
536
+ <summary><h3>Debugging</h3></summary>
307
537
 
308
- ### Debugging
538
+ <br>
309
539
 
310
540
  **Enable verbose logging**:
311
541
  ```bash
@@ -319,10 +549,10 @@ ccs glmt --verbose "your prompt"
319
549
  # Logs: ~/.ccs/logs/
320
550
  ```
321
551
 
322
- **Check streaming mode**:
552
+ **GLMT debugging**:
323
553
  ```bash
324
- # Disable streaming for debugging
325
- CCS_GLMT_STREAMING=disabled ccs glmt "test"
554
+ # Verbose logging shows streaming status and reasoning details
555
+ ccs glmt --verbose "test"
326
556
  ```
327
557
 
328
558
  **Check reasoning content**:
@@ -330,87 +560,53 @@ CCS_GLMT_STREAMING=disabled ccs glmt "test"
330
560
  cat ~/.ccs/logs/*response-openai.json | jq '.choices[0].message.reasoning_content'
331
561
  ```
332
562
 
333
- **If absent**: Z.AI API issue (verify key, account status)
334
- **If present**: Transformation issue (check response-anthropic.json)
563
+ **Troubleshooting**:
564
+ - **If absent**: Z.AI API issue (verify key, account status)
565
+ - **If present**: Transformation issue (check `response-anthropic.json`)
335
566
 
336
- ---
567
+ </details>
337
568
 
338
- ## Usage Examples
569
+ <br>
339
570
 
340
- ### Basic Switching
341
- ```bash
342
- ccs # Claude subscription (default)
343
- ccs glm # GLM (no thinking)
344
- ccs glmt # GLM with thinking
345
- ccs kimi # Kimi for Coding
346
- ccs --version # Show version
347
- ```
348
-
349
- ### Multi-Account Setup
350
- ```bash
351
- # Create accounts
352
- ccs auth create work
353
- ccs auth create personal
354
-
355
- # Terminal 1
356
- ccs work "implement feature"
571
+ ## Uninstall
357
572
 
358
- # Terminal 2 (concurrent)
359
- ccs personal "review code"
360
- ```
573
+ <details>
574
+ <summary><h3>Package Managers</h3></summary>
361
575
 
362
- ### Custom Claude CLI Path
576
+ <br>
363
577
 
364
- Non-standard installation location:
365
578
  ```bash
366
- export CCS_CLAUDE_PATH="/path/to/claude" # Unix
367
- $env:CCS_CLAUDE_PATH = "D:\Tools\Claude\claude.exe" # Windows
368
- ```
369
-
370
- See [Troubleshooting Guide](./docs/en/troubleshooting.md#claude-cli-in-non-standard-location)
371
-
372
- ---
579
+ # npm
580
+ npm uninstall -g @kaitranntt/ccs
373
581
 
374
- ## Configuration
582
+ # yarn
583
+ yarn global remove @kaitranntt/ccs
375
584
 
376
- Auto-created during installation via npm postinstall script.
585
+ # pnpm
586
+ pnpm remove -g @kaitranntt/ccs
377
587
 
378
- **~/.ccs/config.json**:
379
- ```json
380
- {
381
- "profiles": {
382
- "glm": "~/.ccs/glm.settings.json",
383
- "glmt": "~/.ccs/glmt.settings.json",
384
- "kimi": "~/.ccs/kimi.settings.json",
385
- "default": "~/.claude/settings.json"
386
- }
387
- }
588
+ # bun
589
+ bun remove -g @kaitranntt/ccs
388
590
  ```
389
591
 
390
- Complete guide: [docs/en/configuration.md](./docs/en/configuration.md)
592
+ </details>
391
593
 
392
- ---
594
+ <details>
595
+ <summary><h3>Official Uninstaller</h3></summary>
393
596
 
394
- ## Uninstall
597
+ <br>
395
598
 
396
- **Package Managers**
397
- ```bash
398
- npm uninstall -g @kaitranntt/ccs
399
- yarn global remove @kaitranntt/ccs
400
- pnpm remove -g @kaitranntt/ccs
401
- bun remove -g @kaitranntt/ccs
402
- ```
403
-
404
- **Official Uninstaller**
405
599
  ```bash
406
600
  # macOS / Linux
407
601
  curl -fsSL ccs.kaitran.ca/uninstall | bash
408
602
 
409
- # Windows
603
+ # Windows PowerShell
410
604
  irm ccs.kaitran.ca/uninstall | iex
411
605
  ```
412
606
 
413
- ---
607
+ </details>
608
+
609
+ <br>
414
610
 
415
611
  ## 🎯 Philosophy
416
612
 
@@ -418,8 +614,6 @@ irm ccs.kaitran.ca/uninstall | iex
418
614
  - **KISS**: Simple bash, no complexity
419
615
  - **DRY**: One source of truth (config)
420
616
 
421
- ---
422
-
423
617
  ## 📖 Documentation
424
618
 
425
619
  **Complete documentation in [docs/](./docs/)**:
@@ -431,19 +625,23 @@ irm ccs.kaitran.ca/uninstall | iex
431
625
  - [Troubleshooting](./docs/en/troubleshooting.md)
432
626
  - [Contributing](./CONTRIBUTING.md)
433
627
 
434
- ---
435
-
436
628
  ## 🤝 Contributing
437
629
 
438
630
  We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.
439
631
 
440
- ---
441
632
 
442
- ## 📄 License
633
+ ## Star History
443
634
 
444
- CCS is licensed under the [MIT License](LICENSE).
635
+ <div align="center">
445
636
 
446
- ---
637
+ <img src="https://api.star-history.com/svg?repos=kaitranntt/ccs&type=timeline&logscale&legend=top-left" alt="Star History Chart" width="800">
638
+
639
+ </div>
640
+
641
+
642
+ ## License
643
+
644
+ CCS is licensed under the [MIT License](LICENSE).
447
645
 
448
646
  <div align="center">
449
647