* fix(cliproxy): pass variant port to executor for isolation Variants configured with dedicated ports (8318-8417) were not using their assigned port. The executor always defaulted to 8317. Changes: - Add port field to ProfileDetectionResult interface - Pass variant.port from profile-detector to ccs.ts - Forward port to execClaudeWithCLIProxy options - Update executor priority: CLI flags > variant port > config.yaml > default Closes #228 * fix(cliproxy): propagate port in unified config and UI preset handlers Edge case fixes identified in codebase review: - Unified config variant detection: add settingsPath and port fields - Provider editor: use variant port in handleApplyPreset/handleCustomPresetApply - preset-utils: add optional port parameter to applyDefaultPreset() * chore(release): 7.11.1-dev.1 [skip ci] * fix(cliproxy): use correct default port (8317) for remote HTTP connections Root cause: Inconsistent default port logic across code paths. - Test Connection used 8317 (correct) - Actual API calls used 80 (wrong) Changes: - Add centralized getRemoteDefaultPort() helper in config-generator.ts - Fix proxy-target-resolver.ts to use shared helper - Fix rewriteLocalhostUrls() and getRemoteEnvVars() in config-generator.ts - Update remote-proxy-client.ts to use shared helper (DRY) Fixes all 3 reported issues: 1. Port empty → now correctly uses :8317 instead of :80 2. BASEURL construction → now includes correct port 3. CLIProxy Plus auth → now fetches from remote on correct port * chore(release): 7.11.1-dev.2 [skip ci] * feat(delegation): add Claude Code CLI flag passthrough Add explicit passthrough support for key Claude Code CLI flags: - --max-turns: Limit agentic turns (prevents infinite loops) - --fallback-model: Auto-fallback when model overloaded - --agents: Dynamic subagent JSON injection - --betas: Enable experimental features Maintain extraArgs catch-all for future Claude Code flags. Update help command with new "Delegation Flags" section. Closes #89 * test(delegation): add comprehensive CLI flag passthrough tests Add 45 test cases covering all edge cases for CLI flag passthrough: - DelegationHandler: timeout/max-turns/fallback-model/agents/betas validation - HeadlessExecutor: duplicate flag filtering, undefined vs truthy checks * chore(release): 7.11.1-dev.3 [skip ci] * fix(ui): enable cancel button during OAuth authentication Resolves #234 - Cancel button was disabled during authentication flow, preventing users from canceling the OAuth process. Changes: - Add auth-session-manager.ts for tracking active OAuth sessions - Add POST /cliproxy/auth/:provider/cancel endpoint to abort sessions - Kill spawned CLIProxy auth process when cancel is triggered - Enable Cancel button in AddAccountDialog during authentication - Add cancel support to QuickSetupWizard auth step - Update useCancelAuth hook to call backend cancel endpoint * chore(release): 7.11.1-dev.4 [skip ci] * fix(prompt): add stdin.pause() to prevent process hang after password input Fixes #236. The password() method called resume() on stdin but never paused it in cleanup, keeping the event loop alive indefinitely. * chore(release): 7.11.1-dev.5 [skip ci] * feat(cliproxy): add --allow-self-signed flag for HTTPS connections (#227) Previously, allowSelfSigned was hardcoded to true for all HTTPS protocol connections, forcing use of the native https module which has issues with Cloudflare-proxied connections causing timeouts. This change: - Adds --allow-self-signed CLI flag (default: false) - Adds CCS_ALLOW_SELF_SIGNED environment variable - Uses standard fetch API by default for HTTPS (works with valid certs) - Only uses native https module when --allow-self-signed is specified Usage: - For production HTTPS proxies with valid certs: no flag needed - For dev proxies with self-signed certs: use --allow-self-signed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> * chore(release): 7.11.1-dev.6 [skip ci] --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Shun Kakinoki <39187513+shunkakinoki@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.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
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 |
| 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 minimax |
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.
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 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: 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.
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.






