CC Switch - All-in-One AI CLI Management Tool
CC Switch tutorial — a cross-platform tool for unified management of provider configs, MCP servers, and system prompts for Claude Code, Codex, Gemini CLI, OpenCode and other AI coding tools. One-click import from 58API.
🔀 CC Switch is an open-source, cross-platform desktop tool that manages provider configs, MCP servers, system prompts and Skills for 10 AI coding tools, including Claude Code, Claude Desktop, Codex, Gemini CLI, OpenCode and OpenClaw. It ships with a built-in 58API preset (just enter your API key to use it) and lets you freely switch between multiple AI coding assistants without manually editing config files.
- GitHub Repository: https://github.com/farion1231/cc-switch
- Download: GitHub Releases
Key Features
🔌 Provider Management
- One-click switching — Switch between Claude Code, Codex, and Gemini API configs instantly, no manual env vars or config file editing
- Multi-endpoint support — Configure multiple endpoints per provider with API key management and latency speed tests
- Claude model mapping — For Claude, set a main model plus default Haiku / Sonnet / Opus model mappings
🛠️ MCP Server Management
- Unified cross-app management — Manage MCP servers for Claude / Codex / Gemini from a single panel
- Three transport types — Supports stdio, HTTP, and SSE (Server-Sent Events)
- Auto sync — Unified import/export with bidirectional synchronization
💬 Prompts Management
- Multi-preset system prompts — Unlimited presets with quick switching
- Cross-app support — Claude (
CLAUDE.md), Codex (AGENTS.md), Gemini (GEMINI.md) - Markdown editor — CodeMirror 6 with live preview
🌐 Multi-platform Support
- Desktop app — Native installers for Windows, macOS, and Linux
- CLI (community edition) — For servers / SSH environments, use SaladDay/cc-switch-cli
58API Integration
Method 1: Add 58API manually with Custom configuration (recommended)
In CC Switch, choose Custom configuration (自定义配置) and follow the steps below to enter the 58API name and API key.
- Choose a tool and add a provider Open CC Switch, choose the tool you want to configure on the left (e.g. Codex or Claude Code), and click Add Provider (添加供应商) at the top right.
- Select Custom configuration Choose Custom configuration (自定义配置) and set up 58API manually. If you don't see Custom configuration, update CC Switch to the latest version first.
These screenshots show CC Switch's Chinese interface; the steps are the same in other languages. - Enter the name and API key You can set the name to 58API, or enter any name you prefer. In the API Key field, paste the key you copied from the API Keys page of the 58API console, then click Add (添加) at the bottom right. Set the website link to
https://58api.net. For Codex, set the endpoint tohttps://api.58api.net/v1, and Full URL (完整 URL) stays off.
- Enable 58API Back in the provider list, click the ▶ button to the right of 58API to enable it. Once its status changes to In use (使用中), the setup is complete.

When it takes effect: Claude Code picks up the change immediately; for Codex and Gemini CLI, restart the terminal or the CLI, and fully quit and reopen the Codex desktop app.
The default Codex model after you add the provider depends on your CC Switch version; some versions use gpt-5.6-sol (it still works). We recommend clicking the edit button to the right of 58API and changing the model to gpt-6.1-sol. The selected model must be available in the key's group.
When filling in the fields manually, note that CC Switch does not add or remove /v1, and each tool needs a different address:
| Tool | API address | Recommended model |
|---|---|---|
| Claude Code | https://api.58api.net (no /v1) | claude-sonnet-5-5 (Opus tier claude-opus-5-5, Haiku tier claude-haiku-5-5) |
| Codex | https://api.58api.net/v1 (must include /v1) | gpt-6.1-sol |
| Gemini CLI | https://api.58api.net (no /v1) | gemini-3.8-flash |
For OpenCode, OpenClaw, Hermes, Pi, MiniMax Code and other tools, use the same steps: choose Custom configuration and fill in the fields manually.
Method 2: One-click import from the 58API console
You can also import an API key into CC Switch with one click from the 58API console. The imported name, API address and model are the same as in CC Switch's built-in 58API preset, so there is nothing to fill in yourself.
One-click import supports Claude Code CLI, Codex, Gemini CLI and Grok Build. Claude Desktop, OpenCode, OpenClaw, Hermes, Pi and MiniMax Code are not supported yet; add them with Method 1 instead.
Prerequisite: CC Switch is installed (see "Installation" below) and has been opened at least once (on macOS, move it to the Applications folder first, then open it). Otherwise the browser cannot open
ccswitch://links.
- Open the import dialog On the API Keys page of the 58API console, click the "⋯" button at the far right of the row of the key you want to use, then choose CC Switch. The Import to CC Switch dialog opens (the CC Switch app is not launched yet).
- Choose the app and check the details Under Application, choose the tool you want to import into. The dialog shows the provider name after import (58API), the API address, the default model and the key's group.
These screenshots show the Chinese console UI. The console is also available in English, so follow the labels in the text. Each app is imported with the following settings: AppAPI addressDefault modelClaude Code CLIhttps://api.58api.netNot set; Claude Code uses its own default model (same as the preset)Codexhttps://api.58api.net/v1``gpt-6.1-solGemini CLIhttps://api.58api.net``gemini-3.8-flashGrok Buildhttps://api.58api.net/v1``grok-4.7
- The default model is only the initial choice. You can switch to any model in the key's group later.
- Check the key group: Claude Code CLI needs a group that provides Claude models, Codex needs GPT models, Gemini CLI needs Gemini models and Grok Build needs Grok models; otherwise requests will fail. If the group is wrong, first edit the key on the API Keys page and change its group. The group shown in the screenshots is just an example.
- If you choose Claude Desktop, the button changes to Copy Key. Copy the key, then follow Method 1: under Claude Desktop in CC Switch, choose Custom configuration, enter the name and paste the key, then save.
- Click the ⓘ icon next to Application to see how to add other tools.
- Import and apply Click Open CC Switch and allow the browser to open CC Switch. CC Switch shows a Confirm Import Provider dialog. Check the Provider Name (58API), API Endpoint and Model, leave Switch to this provider after import turned on, then click Import. Click Cancel to discard the import. API Endpoint lists two addresses:
https://api.58api.net, marked Primary, and the backuphttps://api.58api.net(for Codex and Grok Build, both end with/v1). Both work, so there is no need to change them. The change takes effect the same way as in Method 1.
Providers imported with the old console (named My Claude / My Codex / My Gemini) keep working. If you'd like to tidy up, delete the old providers in CC Switch and use the newly imported 58API provider instead.
Show balance in CC Switch
CC Switch can show your 58API wallet balance (CNY) on the provider card. Create an access token in the 58API console and fill it into CC Switch usage query settings.
- Open usage query settings Hover the 58API card in CC Switch, click ⋯, and choose Configure usage query.
- Create an access token In the 58API console, open Security & Access → Access tokens → Create access token.
- Name and permissions Name it e.g.
balance-check. Under Personal, grant view for Profile, Usage, and Wallet only (no edit). Create and copy the token. - Find User ID Open Profile in the console; the number next to your name is the User ID.
- Fill the NewAPI template In CC Switch usage query: enable it, choose preset template NewAPI, set request URL to
https://api.58api.net, paste the token, enter User ID, set interval (0 = manual), then save. - Change unit to CNY NewAPI template defaults to USD. Reopen usage query, scroll to the script, change
unit: "USD"tounit: "CNY", and save.
The card then shows balance in CNY. Do not share access tokens; revoke them under Security & Access if leaked.
Installation
macOS (Homebrew recommended)
brew install --cask cc-switchCC Switch is now in the official Homebrew cask repository, so brew tap farion1231/ccswitch is no longer needed. That third-party tap is no longer maintained; if you added it before, remove it with brew untap farion1231/ccswitch.
Windows
Download the .msi installer or portable .zip from Releases.
Linux
Download the .deb, .rpm or .AppImage package (x86_64 / arm64) from Releases.
ArchLinux users:
paru -S cc-switch-binServers / SSH Environments (no GUI)
CC Switch officially ships only the desktop app. For servers or remote SSH environments, use the community command-line edition recommended in the official README, CC Switch CLI (macOS / Linux):
curl -fsSL https://github.com/SaladDay/cc-switch-cli/releases/latest/download/install.sh | bashOn macOS you can also use brew install cc-switch-cli. The CLI edition cannot use one-click import from the 58API console; follow Method 1 above, choose Custom configuration, and fill in the addresses from the table.
Related Links
OpenAI Codex CLI
Install Codex CLI on Windows (WSL), macOS, and Linux, and set base_url in ~/.codex/config.toml to https://api.58api.net/v1 with a 58API token.
VS Code - Directly call 58API
Use the .http file of REST Client to call 58API, enter the key when running the request, and do not write the .http file.