* fix(version): show active config path instead of deprecated config.json The version command was using deprecated getConfigPath() which always returned config.json path. Now uses getActiveConfigPath() which shows config.yaml in unified mode or config.json in legacy mode. * chore(release): 7.37.1-dev.1 [skip ci] * fix(ui): use native dynamic import to fix Node 24 ESM/CJS interop TypeScript compiles import() to require() when targeting CommonJS, which breaks ESM packages like ora on Node 24. Use new Function() to create native dynamic import at runtime, bypassing TS transform. Closes #472 * chore(release): 7.37.1-dev.2 [skip ci] * fix(env): strip ANTHROPIC_* from account/default profiles Account and default profiles inherit process.env which may contain stale ANTHROPIC_BASE_URL from prior CLIProxy sessions. This causes ConnectionRefused errors when Claude tries to hit an unavailable proxy. Settings-based profiles already handle this by explicitly injecting their own ANTHROPIC_* values. This fix applies the same protection to account/default profiles by stripping ANTHROPIC_* before spawn. Closes #474 * test(env): add unit tests for stripAnthropicEnv Address code review feedback from PR #475. Tests cover: - Removing all ANTHROPIC_* keys - Preserving non-ANTHROPIC keys - Empty object handling - Undefined value preservation - Case sensitivity (only uppercase ANTHROPIC_) - All ANTHROPIC_ prefixed variants stripped * chore(release): 7.37.1-dev.3 [skip ci] * feat(cliproxy): add extended context support for 1M token window Add --1m and --no-1m flags to enable/disable 1M token context window. Uses Claude Code's [1m] suffix mechanism. Behavior: - Gemini models: auto-enabled by default - Claude models: opt-in with --1m flag - New extendedContext field in model catalog Also adds Claude Opus 4.6 to model catalog with extended context support. Closes #103 * feat(ui): add extended context toggle in dashboard model config - Add ExtendedContextToggle component for 1M token context window - Add Claude Opus 4.6 (claude-opus-4-6-20260203) to model catalogs - Mark Gemini and Claude models with extendedContext: true - Toggle only appears when selected model supports extended context - Auto-enabled info for native Gemini, opt-in info for Claude Part of extended context feature implementation for issue #103. * fix: address code review findings and CI failure - Fix CI error: add missing 'provider' prop to ModelConfigSection - Fix case sensitivity in applyExtendedContextSuffix - Fix whitespace handling in stripModelSuffixes - Handle --1m=value and --no-1m=value CLI patterns - Add warning when --1m used on unsupported model - Sync agy catalog: add extendedContext to gemini-3-pro-preview - Extract isNativeGeminiModel to shared utility (DRY) - Add 21 unit tests for extended-context-config * fix(catalog): rename claude-opus-4-6-20260203 to claude-opus-4-6 * fix(ui): wire extended context toggle through component tree - Add extendedContextEnabled and toggleExtendedContext to useProviderEditor hook - Store setting as CCS_EXTENDED_CONTEXT env var in provider settings - Pass props through provider-editor → model-config-tab → model-config-section - Update UseProviderEditorReturn type with new properties * fix(ui): apply [1m] suffix directly to model strings in settings - Toggle now applies/strips [1m] suffix to all ANTHROPIC_*MODEL env vars - Extended context detected by checking if any model has [1m] suffix - Remove legacy CCS_EXTENDED_CONTEXT flag approach - Add suffix utilities: applyExtendedContextSuffix, stripExtendedContextSuffix - Raw Configuration now shows actual model values with [1m] suffix * fix(qwen): update model catalog with correct context windows and tier mappings - Update context window specs from official Alibaba docs: - Qwen3 Coder Plus: 1M context (was 32K) - Qwen3 Max: 256K context (flagship) - Qwen3 Coder Flash: fast code generation - Fix preset mappings for Claude tier equivalence: - Opus → qwen3-max (flagship 256K) - Sonnet → qwen3-coder-plus (balanced 1M) - Haiku → qwen3-coder-flash (fast) - Update provider descriptions to reflect 256K-1M context range - Add all 7 Qwen models from CLIProxyAPI: qwen3-coder-plus, qwen3-max, qwen3-max-preview, qwen3-235b, qwen3-vl-plus, qwen3-coder-flash, qwen3-32b Closes #478 * fix(ui): only apply [1m] suffix to ANTHROPIC_MODEL, fix toggle refresh - Only ANTHROPIC_MODEL gets [1m] suffix, not tier mappings - Strip [1m] when looking up model in catalog to prevent toggle disappearing - Fix odd page refresh when toggling extended context * chore(release): 7.37.1-dev.4 [skip ci] * fix(ui): remove duplicate import in use-provider-editor * chore: address PR review feedback - sync comment and unused import * chore(release): 7.37.1-dev.5 [skip ci] * feat(cliproxy): add Opus 4.6 to Antigravity model catalog (#482) * feat(cliproxy): add Opus 4.6 to Antigravity model catalog - Add gemini-claude-opus-4-6-thinking as new default agy model - Update preset mappings to route opus tier to Opus 4.6 - Bump CLIProxy fallback versions to v6.8.2 - Keep Opus 4.5 as previous flagship option * fix(cliproxy): include oauth-model-alias in config generation Root cause: CLIProxy config.yaml was missing Opus 4.6 alias because: 1. CLIProxyPlus startup migration is disabled (intentional) 2. CCS config generator never wrote oauth-model-alias section 3. Existing users with outdated aliases got 502 on Opus 4.6 Fix: - Add DEFAULT_ANTIGRAVITY_ALIASES to config generator - Generate oauth-model-alias section in config.yaml template - Preserve claude-api-key and custom aliases during regeneration - Bump config version to v6 to trigger auto-regeneration - Update model catalog tests for new model count * fix(cliproxy): preserve YAML indentation in extractYamlSection - Replace .trim() with regex to strip only leading/trailing newlines, preserving 2-space indent on claude-api-key children - Skip standalone comments at col 0 in section boundary detection - Update stale test description (4 → 5 models) * chore(release): 7.37.1-dev.6 [skip ci] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
CCS - Claude Code Switch
The universal AI profile manager for Claude Code.
Run Claude, Gemini, GLM, and any Anthropic-compatible API - concurrently, without conflicts.
The Three Pillars
| Capability | What It Does | Manage Via |
|---|---|---|
| Multiple Claude Accounts | Run work + personal Claude subs simultaneously | Dashboard |
| OAuth Providers | Gemini, Codex, Antigravity - zero API keys needed | Dashboard |
| API Profiles | GLM, Kimi, or any Anthropic-compatible API | Dashboard |
Quick Start
1. Install
npm install -g @kaitranntt/ccs
Alternative package managers
yarn global add @kaitranntt/ccs # yarn
pnpm add -g @kaitranntt/ccs # pnpm (70% less disk space)
bun add -g @kaitranntt/ccs # bun (30x faster)
2. Open Dashboard
ccs config
# Opens http://localhost:3000
Want to run the dashboard in Docker? See docker/README.md.
3. Configure Your Accounts
The dashboard provides visual management for all account types:
- Claude Accounts: Create isolated instances (work, personal, client)
- OAuth Providers: One-click auth for Gemini, Codex, Antigravity
- API Profiles: Configure GLM, Kimi with your keys
- Health Monitor: Real-time status across all profiles
Analytics Dashboard
Live Auth Monitor
CLI Proxy API & Copilot Integration
WebSearch Fallback
Built-in Providers
| Provider | Auth Type | Command | Best For |
|---|---|---|---|
| Claude | Subscription | ccs |
Default, strategic planning |
| Gemini | OAuth | ccs gemini |
Zero-config, fast iteration |
| Codex | OAuth | ccs codex |
Code generation |
| Copilot | OAuth | ccs copilot or ccs ghcp |
GitHub Copilot models |
| Kiro | OAuth | ccs kiro |
AWS CodeWhisperer (Claude-powered) |
| Antigravity | OAuth | ccs agy |
Alternative routing |
| OpenRouter | API Key | ccs openrouter |
300+ models, unified API |
| Ollama | Local | ccs ollama |
Local open-source models, privacy |
| Ollama Cloud | API Key | ccs ollama-cloud |
Cloud-hosted open-source models |
| GLM | API Key | ccs glm |
Cost-optimized execution |
| Kimi | API Key | ccs kimi |
Long-context, thinking mode |
| Azure Foundry | API Key | ccs foundry |
Claude via Microsoft Azure |
| Minimax | API Key | ccs mm |
M2 series, 1M context |
| DeepSeek | API Key | ccs deepseek |
V3.2 and R1 reasoning |
| Qwen | API Key | ccs qwen |
Alibaba Cloud, qwen3-coder |
OpenRouter Integration (v7.0.0): CCS v7.0.0 adds OpenRouter with interactive model picker, dynamic discovery, and tier mapping (opus/sonnet/haiku). Create via ccs api create --preset openrouter or dashboard.
Ollama Integration: Run local open-source models (qwen3-coder, gpt-oss:20b) with full privacy. Use ccs api create --preset ollama - requires Ollama v0.14.0+ installed. For cloud models, use ccs api create --preset ollama-cloud.
Azure Foundry: Use ccs api create --preset foundry to set up Claude via Microsoft Azure AI Foundry. Requires Azure resource and API key from ai.azure.com.
OAuth providers authenticate via browser on first run. Tokens are cached in
~/.ccs/cliproxy/auth/.
Powered by:
- CLIProxyAPIPlus - Extended OAuth proxy with Kiro (@fuko2935, @Ravens2121) and Copilot (@em4go) support
- CLIProxyAPI - Core OAuth proxy for Gemini, Codex, Antigravity
- copilot-api - GitHub Copilot API integration
Tip
Need more? CCS supports any Anthropic-compatible API. Create custom profiles for self-hosted LLMs, enterprise gateways, or alternative providers. See API Profiles documentation.
Usage
Basic Commands
ccs # Default Claude session
ccs gemini # Gemini (OAuth)
ccs codex # OpenAI Codex (OAuth)
ccs kiro # Kiro/AWS CodeWhisperer (OAuth)
ccs ghcp # GitHub Copilot (OAuth device flow)
ccs agy # Antigravity (OAuth)
ccs ollama # Local Ollama (no API key needed)
ccs glm # GLM (API key)
Parallel Workflows
Run multiple terminals with different providers:
# Terminal 1: Planning (Claude Pro)
ccs work "design the authentication system"
# Terminal 2: Execution (GLM - cost optimized)
ccs glm "implement the user service from the plan"
# Terminal 3: Local testing (Ollama - offline, privacy)
ccs ollama "run tests and generate coverage report"
# Terminal 4: Review (Gemini)
ccs gemini "review the implementation for security issues"
Multi-Account Claude
Create isolated Claude instances for work/personal separation:
ccs auth create work
# Run concurrently in separate terminals
ccs work "implement feature" # Terminal 1
ccs "review code" # Terminal 2 (personal account)
Maintenance
Health Check
ccs doctor
Verifies: Claude CLI, config files, symlinks, permissions.
Update
ccs update # Update to latest
ccs update --force # Force reinstall
ccs update --beta # Install dev channel
Sync Shared Items
ccs sync
Re-creates symlinks for shared commands, skills, and settings.
Antigravity Quota Management
ccs cliproxy doctor # Check quota status for all agy accounts
Auto-Failover: When an Antigravity account runs out of quota, CCS automatically switches to another account with remaining capacity. Shared GCP project accounts are excluded (pooled quota).
Configuration
CCS auto-creates config on install. Dashboard is the recommended way to manage settings.
Config location: ~/.ccs/config.yaml
Custom Claude CLI path
If Claude CLI is installed in a non-standard location:
export CCS_CLAUDE_PATH="/path/to/claude" # Unix
$env:CCS_CLAUDE_PATH = "D:\Tools\Claude\claude.exe" # Windows
Windows symlink support
Enable Developer Mode for true symlinks:
- Settings → Privacy & Security → For developers
- Enable Developer Mode
- Reinstall:
npm install -g @kaitranntt/ccs
Without Developer Mode, CCS falls back to copying directories.
WebSearch
Third-party profiles (Gemini, Codex, GLM, etc.) cannot use Anthropic's native WebSearch. CCS automatically provides web search via CLI tools with automatic fallback.
How It Works
| Profile Type | WebSearch Method |
|---|---|
| Claude (native) | Anthropic WebSearch API |
| Third-party profiles | CLI Tool Fallback Chain |
CLI Tool Fallback Chain
CCS intercepts WebSearch requests and routes them through available CLI tools:
| Priority | Tool | Auth | Install |
|---|---|---|---|
| 1st | Gemini CLI | OAuth (free) | npm install -g @google/gemini-cli |
| 2nd | OpenCode | OAuth (free) | curl -fsSL https://opencode.ai/install | bash |
| 3rd | Grok CLI | API Key | npm install -g @vibe-kit/grok-cli |
Configuration
Configure via dashboard (Settings page) or ~/.ccs/config.yaml:
websearch:
enabled: true # Enable/disable (default: true)
gemini:
enabled: true # Use Gemini CLI (default: true)
model: gemini-2.5-flash # Model to use
opencode:
enabled: true # Use OpenCode as fallback
grok:
enabled: false # Requires XAI_API_KEY
Tip
Gemini CLI is recommended - free OAuth authentication with 1000 requests/day. Just run
geminionce to authenticate via browser.
See docs/websearch.md for detailed configuration and troubleshooting.
Remote CLIProxy
CCS v7.x supports connecting to remote CLIProxyAPI instances, enabling:
- Team sharing: One CLIProxyAPI server for multiple developers
- Cost optimization: Centralized API key management
- Network isolation: Keep API credentials on a secure server
Quick Setup
Configure via dashboard (Settings > CLIProxy Server) or CLI flags:
ccs gemini --proxy-host 192.168.1.100 --proxy-port 8317
ccs codex --proxy-host proxy.example.com --proxy-protocol https
CLI Flags
| Flag | Description |
|---|---|
--proxy-host |
Remote proxy hostname or IP |
--proxy-port |
Remote proxy port (default: 8317 for HTTP, 443 for HTTPS) |
--proxy-protocol |
http or https (default: http) |
--proxy-auth-token |
Bearer token for authentication |
--local-proxy |
Force local mode, ignore remote config |
--remote-only |
Fail if remote unreachable (no fallback) |
See Remote Proxy documentation for detailed setup.
Documentation
| Topic | Link |
|---|---|
| Installation | docs.ccs.kaitran.ca/getting-started/installation |
| Configuration | docs.ccs.kaitran.ca/getting-started/configuration |
| OAuth Providers | docs.ccs.kaitran.ca/providers/oauth-providers |
| Multi-Account Claude | docs.ccs.kaitran.ca/providers/claude-accounts |
| API Profiles | docs.ccs.kaitran.ca/providers/api-profiles |
| Remote Proxy | docs.ccs.kaitran.ca/features/remote-proxy |
| CLI Reference | docs.ccs.kaitran.ca/reference/cli-commands |
| Architecture | docs.ccs.kaitran.ca/reference/architecture |
| Troubleshooting | docs.ccs.kaitran.ca/reference/troubleshooting |
Uninstall
npm uninstall -g @kaitranntt/ccs
Alternative package managers
yarn global remove @kaitranntt/ccs
pnpm remove -g @kaitranntt/ccs
bun remove -g @kaitranntt/ccs
Philosophy
- YAGNI: No features "just in case"
- KISS: Simple, focused implementation
- DRY: One source of truth (config)
Contributing
See CONTRIBUTING.md.
License
MIT License - see LICENSE.






