CC-Switch Configuration Tool
Manage Xiaomai API configurations with a graphical interface and stop editing config files by hand.
Overview
CC-Switch is a cross-platform desktop app that manages Claude Code, Codex, Gemini CLI, OpenCode, and OpenClaw in one place. With CC-Switch, you can connect tools to Xiaomai API through a graphical interface, switch providers with one click, and avoid manually editing JSON, TOML, or .env files.
Supported Environment
- Windows 10 and later
- macOS 12 Monterey and later
- Linux, including Ubuntu 22.04+, Debian 11+, Fedora 34+, Arch, and other mainstream distributions
Links
| Resource | URL |
|---|---|
| GitHub repository | https://github.com/farion1231/cc-switch |
| Downloads | Releases |
Install CC-Switch
Windows
Method 1: MSI Installer (Recommended)
- Open the Releases page
- Download the latest
.msiinstaller - Double-click it and follow the wizard
- Start CC-Switch from the Start menu
Method 2: Portable Version
- Download the portable
.zippackage - Extract it anywhere
- Run
cc-switch.exe
macOS
Note
The macOS version of CC-Switch is Apple code-signed and notarized, so it can be installed and opened directly.
Method 1: Homebrew (Recommended)
brew tap farion1231/ccswitch
brew install --cask cc-switchUpdate:
brew upgrade --cask cc-switchMethod 2: Manual Installation
- Open the Releases page
- Download the
.dmgpackage - Open the DMG and drag CC-Switch into the Applications folder
Linux
Debian / Ubuntu
sudo dpkg -i CC-Switch-*.deb
sudo apt-get install -f # Fix dependenciesFedora / RHEL / openSUSE
sudo rpm -i CC-Switch-*.rpmArch Linux (AUR)
paru -S cc-switch-bin
# Or use yay
yay -S cc-switch-binAppImage
chmod +x CC-Switch-*.AppImage
./CC-Switch-*.AppImageFlatpak
flatpak install --user ./CC-Switch-*.flatpak
flatpak run com.ccswitch.desktopConnect Xiaomai API
Step 1: Import Existing Configurations
On first launch, CC-Switch detects existing CLI tool configurations.
- If you previously configured Claude Code or another tool manually, follow the prompt to import it. The existing config will be saved as the default provider.
- If this is a fresh setup, skip this step.
Step 2: Add a Xiaomai API Provider
- Click Add Provider
- Choose Custom to create a new configuration
Do Not Choose an Official Preset
Official provider presets have locked API endpoints and cannot be changed to Xiaomai API. Choose Custom and fill in the endpoint manually.
- Fill in the following information:
| Field | Value |
|---|---|
| Provider name | A custom name, such as Xiaomai API |
| API endpoint | https://xiaomai.win |
| API key | Your Xiaomai API key, such as sk-xxxx |
| Model | Choose a model as needed, such as claude-sonnet-4-20250514 |
Where to Get the Key
Create a token in the Xiaomai API console. Different tools may require different token groups. See Create an API Key.
- Click Save
Step 3: Enable the Xiaomai API Provider
Choose either method:
- Main window: find the Xiaomai API provider and click Enable
- System tray: right-click the CC-Switch tray icon and select Xiaomai API
Step 4: Verify the Configuration
- Open your AI coding tool, such as Claude Code
- Send a test message and confirm that it responds normally
Tip
Claude Code supports hot provider switching without restart. Codex, Gemini CLI, and most other tools need to be closed and reopened.
Configure Multiple Tools
If you use multiple AI coding tools, such as Claude Code and Codex, add a provider for each tool:
- Switch to the corresponding tool tab at the top of CC-Switch, such as Codex
- Repeat the Add Provider steps
- Use the matching token-group key for each tool
Note
Different tools may require different token groups. Create a dedicated token for each tool on the Xiaomai API platform. See Create an API Key.
More Features
CC-Switch also provides these practical features.
Unified MCP and Skills Management
Manage all MCP servers and skills for supported apps in one panel, with two-way sync.
Prompt Management
Create system prompt presets with a Markdown editor. Activated prompts are synced to the corresponding app config files, such as CLAUDE.md, AGENTS.md, or GEMINI.md.
Session Manager
Browse, search, and restore conversation history from supported apps.
Usage Tracking
Track spending, request counts, and token usage across providers with charts and detailed request logs.
Local Proxy and Failover
Built-in proxy switching, Anthropic/OpenAI format conversion, automatic failover, and circuit breaking.
Cloud Sync
Sync configurations across devices using Dropbox, OneDrive, iCloud, Jianguoyun, or WebDAV.
Backup and Restore
Every configuration change creates an automatic backup. The latest 10 versions are kept and can be restored with one click.
Data Storage Locations
| Path | Description |
|---|---|
~/.cc-switch/cc-switch.db | SQLite database for providers, MCP, prompts, and skills |
~/.cc-switch/settings.json | Local UI preferences |
~/.cc-switch/backups/ | Automatic backups, latest 10 versions |
~/.cc-switch/skills/ | Skill files linked to corresponding apps |
FAQ
I selected an official preset and cannot change the URL
Official preset endpoints are locked. To use Xiaomai API, create a Custom provider and manually enter https://xiaomai.win.
The tool does not respond after switching providers
Most tools need the terminal or CLI tool to be restarted. Claude Code is the exception and supports hot switching.
Plugin configuration disappeared after switching providers
In Edit Provider -> General Config Panel, click Extract from Current Provider to move plugin data into the shared configuration. When creating a new provider, keep Write shared config enabled so those settings are included.
Why cannot one provider be deleted?
CC-Switch always keeps one active configuration so CLI tools can keep working even if CC-Switch is uninstalled. If you rarely use a tool, hide it in settings.
How do I switch back to official login?
Add an Official Provider from presets, switch to it, then run the logout/login flow. After that, you can switch between official and third-party providers.