TUI + CLI dual-mode manager for Claude Code, Codex, Gemini, OpenCode, Hermes & OpenClaw
Use the interactive TUI for daily switching, account, and session work, or the CLI for scripts and repeatable terminal workflows.
Unified management for provider configurations, MCP servers, skills, prompts, local proxy routes, usage statistics, and environment checks across supported AI coding assistants.
English | 中文
This project is a CLI fork of CC-Switch.
🔄 The WebDAV sync feature is fully compatible with the upstream project.
Credits: Original architecture and core functionality from farion1231/cc-switch
Changelog: CHANGELOG.md
|
Thanks to ClaudeAPI for supporting this project! ClaudeAPI is a Claude-focused API access provider built on official and AWS channels, offering high stability, low latency, and full support for Claude Code, Codex, Agent workflows, and enterprise use cases. It also supports business onboarding, team usage management, and invoicing. Exclusive offer for CC-Switch CLI users: register via this exclusive link to receive free trial credits and get started with Claude Code instantly. |
|
Thanks to Qiniu Cloud AI for sponsoring this project! Qiniu Cloud AI is an enterprise-grade large-model MaaS platform from Qiniu Cloud (HKEX: 02567), offering one-stop access to 150+ mainstream models worldwide, compatibility with the protocols of major global model vendors, and full-modality coverage across text, image, audio, video, and file processing — serving over 1.69 million enterprise and developer users. Exclusive benefits: enterprise users can claim 12 million free tokens, and referring friends can earn up to tens of billions of tokens. Register via this link. |
|
Thanks to Fenno.ai for sponsoring this project! Fenno.ai is a stable, efficient API relay provider currently focused on Codex relay. It is compatible with both the OpenAI and Anthropic protocols and plugs smoothly into mainstream coding tools such as Codex, Claude Code, and OpenCode, reliably sustaining enterprise workloads of hundreds of billions of tokens per day, with corporate (B2B) settlement and invoicing for both domestic and overseas entities. Exclusive benefit for CC-Switch CLI users: register via this link to subscribe to a great-value Coding Plan — ¥9.9 for $150 of credit — and earn up to a 20% reward for referrals; the more you invite, the more you get! |
|
Thanks to RunAPI for sponsoring this project! RunAPI is a fast, stable API platform and OpenRouter alternative. One API key gives access to 150+ mainstream models, including OpenAI, Claude, Gemini, DeepSeek, and Grok, with prices as low as 10% of the original cost. It works with tools such as Claude Code and OpenClaw. Exclusive benefit for cc-switch-cli users: register and contact the admin to claim CNY 7 in free credits. |
|
Thanks to Cubence for sponsoring this project! Cubence is an API relay service provider dedicated to offering stable and efficient services to its customers. Operating since September 2025, it has provided support for various models such as Claude code, Codex, and Gemini. Register via this link and use the CCSCLI discount code when topping up to enjoy a 10% discount.
|
|
Thanks to PackyCode for sponsoring this project! PackyCode is a reliable and efficient API relay service provider, offering relay services for Claude Code, Codex, Gemini, and more.
PackyCode provides special discounts for our software users: register via this link and use promo code cc-switch-cli when recharging to get 10% off.
|
|
Thanks to AICodeMirror for sponsoring this project! AICodeMirror provides official high-stability relay services for Claude Code / Codex / Gemini CLI, with enterprise-grade concurrency, fast invoicing, and 24/7 dedicated technical support. Claude Code / Codex / Gemini official channels at 38% / 2% / 9% of original price, with extra discounts on top-ups! AICodeMirror offers special benefits for cc-switch-cli users: register via this link to enjoy 20% off your first top-up, and enterprise customers can get up to 25% off! |
|
Thanks to DDS for sponsoring this project! DDS Hub is a reliable and high-performance Claude API proxy service. DDS Hub provides cost-effective domestic Claude direct acceleration services for both individual and enterprise users. We offer stable and low-latency Claude Max number pools, with full support for Claude Haiku, Opus, Sonnet and other flagship models. Invoices are available for recharges of 1000 RMB or more. Enterprise customers can also enjoy customized grouping and dedicated technical support services. Exclusive benefit for CC-Switch CLI users: register via this link and enjoy an extra 10% credit on your first recharge (please contact the group admin to claim after recharging)! |

| Switch | Settings |
|---|---|
![]() |
![]() |
TUI Mode (Recommended)
cc-switch
Use the full-screen interface to switch providers, manage accounts, review sessions, and inspect proxy status.
Command-Line Mode
cc-switch provider list # List providers
cc-switch provider switch <id> # Switch provider
cc-switch use <id> # Switch provider (shortcut)
cc-switch provider export <id> # Export a Claude provider to a standalone settings file
cc-switch provider stream-check <id> # Check provider stream health
cc-switch start <claude|codex> <id> --dry-run # Preview launch
cc-switch auth list # List managed ChatGPT/Codex OAuth accounts
cc-switch sessions list --all # Review saved assistant sessions
cc-switch sessions sync-usage --all # Import local session token/cost usage
cc-switch config webdav show # Inspect WebDAV sync settings
cc-switch env tools # Check local CLI tools
cc-switch mcp sync # Sync MCP servers
cc-switch proxy show # Inspect proxy routes and status
# Use the global `--app` flag to target specific applications:
cc-switch --app claude provider list # Manage Claude providers
cc-switch --app codex mcp sync # Sync Codex MCP servers
cc-switch --app gemini prompts list # List Gemini prompts
cc-switch --app hermes provider list # Manage Hermes providers
cc-switch --app openclaw provider list # Manage OpenClaw providers
# Supported apps: `claude` (default), `codex`, `gemini`, `opencode`, `hermes`, `openclaw`
See the "Features" section for full command list.
Windows users: see Manual Installation below.
curl -fsSL https://github.com/SaladDay/cc-switch-cli/releases/latest/download/install.sh | bash
This installs cc-switch to ~/.local/bin. Set CC_SWITCH_INSTALL_DIR to change the target directory.
CC_SWITCH_FORCE=1 is set.CC_SWITCH_LINUX_LIBC=glibc if you need the glibc build.Manual Installation
# Download Universal Binary (recommended, supports Apple Silicon + Intel)
curl -LO https://github.com/saladday/cc-switch-cli/releases/latest/download/cc-switch-cli-darwin-universal.tar.gz
# Extract
tar -xzf cc-switch-cli-darwin-universal.tar.gz
# Add execute permission
chmod +x cc-switch
# Move to PATH
sudo mv cc-switch /usr/local/bin/
# If you encounter "cannot be verified" warning
xattr -cr /usr/local/bin/cc-switch
# Download
curl -LO https://github.com/saladday/cc-switch-cli/releases/latest/download/cc-switch-cli-linux-x64-musl.tar.gz
# Extract
tar -xzf cc-switch-cli-linux-x64-musl.tar.gz
# Add execute permission
chmod +x cc-switch
# Move to PATH
sudo mv cc-switch /usr/local/bin/
# For Raspberry Pi or ARM servers
curl -LO https://github.com/saladday/cc-switch-cli/releases/latest/download/cc-switch-cli-linux-arm64-musl.tar.gz
tar -xzf cc-switch-cli-linux-arm64-musl.tar.gz
chmod +x cc-switch
sudo mv cc-switch /usr/local/bin/
# Download the zip file
# https://github.com/saladday/cc-switch-cli/releases/latest/download/cc-switch-cli-windows-x64.zip
# After extracting, move cc-switch.exe to a PATH directory, e.g.:
move cc-switch.exe C:\Windows\System32\
# Or run directly
.\cc-switch.exe
If you are using Homebrew on your machine, you can use Homebrew to install cc-switch.
brew install cc-switch-cli
Update:
brew upgrade cc-switch-cli
If you installed cc-switch via Homebrew, please use Homebrew to upgrade cc-switch, instead of the built-in update feature, as this breaks Homebrew formulae’s own upgrade functionality.
Prerequisites: - Rust 1.85+ (install via rustup)
Build:
git clone https://github.com/saladday/cc-switch-cli.git
cd cc-switch-cli/src-tauri
cargo build --release
# Binary location: ./target/release/cc-switch
Install to System:
# macOS/Linux
sudo cp target/release/cc-switch /usr/local/bin/
# Windows
copy target\release\cc-switch.exe C:\Windows\System32\
Manage API configurations for Claude Code, Codex, Gemini, OpenCode, Hermes, and OpenClaw.
Features: One-click switching, standalone Claude settings export, multi-endpoint support, API key management, remote model discovery, and per-app diagnostics such as speed testing or stream health checks where supported.
```bash cc-switch provider list # List all providers cc-switch provider current # Show current provider cc-switch provider switch # Switch provider cc-switch use # Switch provider (shortcut) cc-switch provider add # Add new provider cc-switch provider edit # Edit existing provider cc-switch provider duplicate # Duplicate a provider cc-switch provider delete # Delete provider cc-switch provider
$ claude mcp add cc-switch-cli \
-- python -m otcore.mcp_server <graph>