Skip to content

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
ResourceURL
GitHub repositoryhttps://github.com/farion1231/cc-switch
DownloadsReleases

Install CC-Switch

Windows

  1. Open the Releases page
  2. Download the latest .msi installer
  3. Double-click it and follow the wizard
  4. Start CC-Switch from the Start menu

Method 2: Portable Version

  1. Download the portable .zip package
  2. Extract it anywhere
  3. 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.

bash
brew tap farion1231/ccswitch
brew install --cask cc-switch

Update:

bash
brew upgrade --cask cc-switch

Method 2: Manual Installation

  1. Open the Releases page
  2. Download the .dmg package
  3. Open the DMG and drag CC-Switch into the Applications folder

Linux

Debian / Ubuntu

bash
sudo dpkg -i CC-Switch-*.deb
sudo apt-get install -f  # Fix dependencies

Fedora / RHEL / openSUSE

bash
sudo rpm -i CC-Switch-*.rpm

Arch Linux (AUR)

bash
paru -S cc-switch-bin
# Or use yay
yay -S cc-switch-bin

AppImage

bash
chmod +x CC-Switch-*.AppImage
./CC-Switch-*.AppImage

Flatpak

bash
flatpak install --user ./CC-Switch-*.flatpak
flatpak run com.ccswitch.desktop

Connect 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

  1. Click Add Provider
  2. 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.

  1. Fill in the following information:
FieldValue
Provider nameA custom name, such as Xiaomai API
API endpointhttps://xiaomai.win
API keyYour Xiaomai API key, such as sk-xxxx
ModelChoose 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.

  1. 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

  1. Open your AI coding tool, such as Claude Code
  2. 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:

  1. Switch to the corresponding tool tab at the top of CC-Switch, such as Codex
  2. Repeat the Add Provider steps
  3. 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

PathDescription
~/.cc-switch/cc-switch.dbSQLite database for providers, MCP, prompts, and skills
~/.cc-switch/settings.jsonLocal 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.

More Questions

Read the FAQ or contact support.

Friendly, practical, and reliable AI coding support