Command-Line Management Tool for Claude Code, Codex & Gemini CLI
Unified management for Claude Code, Codex & Gemini CLI provider configurations, MCP servers, Skills extensions, and system prompts.
This project is a CLI fork of CC-Switch.
Credits: Original architecture and core functionality from farion1231/cc-switch
| Interactive Main Menu | Provider Management |
|---|---|
Interactive Mode (Recommended)
cc-switch🤩 Follow on-screen menus to explore features.
Command-Line Mode
cc-switch provider list # List providers
cc-switch provider switch <id> # Switch provider
cc-switch mcp sync # Sync MCP servers
# 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
# Supported apps: `claude` (default), `codex`, `gemini`See the "Features" section below for full command list.
Manage API configurations for Claude Code, Codex, and Gemini.
Features: One-click switching, multi-endpoint support, API key management, speed testing, provider duplication.
cc-switch provider list # List all providers
cc-switch provider current # Show current provider
cc-switch provider switch <id> # Switch provider
cc-switch provider add # Add new provider
cc-switch provider edit <id> # Edit existing provider
cc-switch provider duplicate <id> # Duplicate a provider
cc-switch provider delete <id> # Delete provider
cc-switch provider speedtest <id> # Test API latencyManage Model Context Protocol servers across Claude/Codex/Gemini.
Features: Unified management, multi-app support, three transport types (stdio/http/sse), automatic sync, smart TOML parser.
cc-switch mcp list # List all MCP servers
cc-switch mcp add # Add new MCP server (interactive)
cc-switch mcp edit <id> # Edit MCP server
cc-switch mcp delete <id> # Delete MCP server
cc-switch mcp enable <id> --app claude # Enable for specific app
cc-switch mcp disable <id> --app claude # Disable for specific app
cc-switch mcp validate <command> # Validate command in PATH
cc-switch mcp sync # Sync to live files
cc-switch mcp import --app claude # Import from live configManage system prompt presets for AI coding assistants.
Cross-app support: Claude (CLAUDE.md), Codex (AGENTS.md), Gemini (GEMINI.md).
cc-switch prompts list # List prompt presets
cc-switch prompts current # Show current active prompt
cc-switch prompts activate <id> # Activate prompt
cc-switch prompts deactivate # Deactivate current active prompt
cc-switch prompts create # Create new prompt preset
cc-switch prompts edit <id> # Edit prompt preset
cc-switch prompts show <id> # Display full content
cc-switch prompts delete <id> # Delete promptManage and extend Claude Code/Codex/Gemini capabilities with community skills.
Features: Search skill marketplace, install/uninstall, repository management, skill information.
cc-switch skills list # List installed skills
cc-switch skills search <query> # Search available skills
cc-switch skills install <name> # Install a skill
cc-switch skills uninstall <name> # Uninstall a skill
cc-switch skills info <name> # Show skill information
cc-switch skills repos # Manage skill repositoriesManage configuration backups, imports, and exports.
Features: Custom backup naming, interactive backup selection, automatic rotation (keep 10), import/export.
cc-switch config show # Display configuration
cc-switch config path # Show config file paths
cc-switch config validate # Validate config file
# Backup
cc-switch config backup # Create backup (auto-named)
cc-switch config backup --name my-backup # Create backup with custom name
# Restore
cc-switch config restore # Interactive: select from backup list
cc-switch config restore --backup <id> # Restore specific backup by ID
cc-switch config restore --file <path> # Restore from external file
# Import/Export
cc-switch config export <path> # Export to external file
cc-switch config import <path> # Import from external file
cc-switch config reset # Reset to default configurationInteractive mode supports English and Chinese, language settings are automatically saved.
- Default language: English
- Go to
⚙️ Settingsmenu to switch language
Shell completions, environment management, and other utilities.
# Shell completions
cc-switch completions <shell> # Generate shell completions (bash/zsh/fish/powershell)
# Environment management
cc-switch env check # Check for environment conflicts
cc-switch env list # List environment variablesDownload the latest release from GitHub Releases.
# Download Universal Binary (recommended, supports Apple Silicon + Intel)
curl -LO https://github.com/saladday/cc-switch-cli/releases/latest/download/cc-switch-cli-v4.1.2-darwin-universal.tar.gz
# Extract
tar -xzf cc-switch-cli-v4.1.2-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-v4.1.2-linux-x64-musl.tar.gz
# Extract
tar -xzf cc-switch-cli-v4.1.2-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-v4.1.2-linux-arm64-musl.tar.gz
tar -xzf cc-switch-cli-v4.1.2-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-v4.1.2-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.exePrerequisites:
- 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-switchInstall to System:
# macOS/Linux
sudo cp target/release/cc-switch /usr/local/bin/
# Windows
copy target\release\cc-switch.exe C:\Windows\System32\- SSOT: All config in
~/.cc-switch/config.json, live configs are generated artifacts - Atomic Writes: Temp file + rename pattern prevents corruption
- Service Layer Reuse: 100% reused from original GUI version
- Concurrency Safe: RwLock with scoped guards
CC-Switch Storage:
~/.cc-switch/config.json- Main configuration (SSOT)~/.cc-switch/settings.json- Settings~/.cc-switch/backups/- Auto-rotation (keep 10)
Live Configs:
- Claude:
~/.claude/settings.json,~/.claude.json(MCP),~/.claude/CLAUDE.md(prompts) - Codex:
~/.codex/auth.json,~/.codex/config.toml(MCP),~/.codex/AGENTS.md(prompts) - Gemini:
~/.gemini/.env,~/.gemini/settings.json(MCP),~/.gemini/GEMINI.md(prompts)
Why doesn't my configuration take effect after switching providers?
This is usually caused by environment variable conflicts. If you have API keys set in system environment variables (like ANTHROPIC_API_KEY, OPENAI_API_KEY), they will override CC-Switch's configuration.
Solution:
-
Check for conflicts:
cc-switch env check --app claude
-
List all related environment variables:
cc-switch env list --app claude
-
If conflicts are found, manually remove them:
- macOS/Linux: Edit your shell config file (
~/.bashrc,~/.zshrc, etc.)# Find and delete the line with the environment variable nano ~/.zshrc # Or use your preferred text editor: vim, code, etc.
- Windows: Open System Properties → Environment Variables and delete the conflicting variables
- macOS/Linux: Edit your shell config file (
-
Restart your terminal for changes to take effect.
Which apps are supported?
CC-Switch currently supports three AI coding assistants:
- Claude Code (
--app claude, default) - Codex (
--app codex) - Gemini (
--app gemini)
Use the global --app flag to specify which app to manage:
cc-switch --app codex provider listHow do I report bugs or request features?
Please open an issue on our GitHub Issues page with:
- Detailed description of the problem or feature request
- Steps to reproduce (for bugs)
- Your system information (OS, version)
- Relevant logs or error messages
- Rust: 1.85+ (rustup)
- Cargo: Bundled with Rust
cd src-tauri
cargo run # Development mode
cargo run -- provider list # Run specific command
cargo build --release # Build release
cargo fmt # Format code
cargo clippy # Lint code
cargo test # Run testssrc-tauri/src/
├── cli/
│ ├── commands/ # CLI subcommands (provider, mcp, prompts, config)
│ ├── interactive/ # Interactive TUI mode
│ └── ui.rs # UI utilities (tables, colors)
├── services/ # Business logic
├── main.rs # CLI entry point
└── ...
Contributions welcome! This fork focuses on CLI functionality.
Before submitting PRs:
- ✅ Pass format check:
cargo fmt --check - ✅ Pass linter:
cargo clippy - ✅ Pass tests:
cargo test - 💡 Open an issue for discussion first
- MIT © Original Author: Jason Young
- CLI Fork Maintainer: saladday