| name | cc-switch-cli |
| description | Cross-platform CLI tool for managing Claude Code, Codex, Gemini, OpenCode & OpenClaw providers, MCP servers, prompts, skills, and proxies. |
| triggers | ["switch my Claude provider","manage MCP servers","add a new API provider","sync my prompts across coding assistants","configure WebDAV sync for cc-switch","check Claude stream health","install community skills","set up local proxy routes"] |
cc-switch-cli
Skill by ara.so — Devtools Skills collection.
cc-switch-cli is a Rust-based command-line tool for unified management of AI coding assistant configurations. It handles provider switching, MCP server orchestration, prompt presets, community skills, and local proxy routing across Claude Code, Codex, Gemini, OpenCode, and OpenClaw.
Installation
Quick Install (macOS/Linux)
curl -fsSL https://github.com/SaladDay/cc-switch-cli/releases/latest/download/install.sh | bash
Installs to ~/.local/bin by default. Override with CC_SWITCH_INSTALL_DIR:
CC_SWITCH_INSTALL_DIR=/usr/local/bin curl -fsSL https://github.com/SaladDay/cc-switch-cli/releases/latest/download/install.sh | bash
Force overwrite existing installation:
CC_SWITCH_FORCE=1 curl -fsSL https://github.com/SaladDay/cc-switch-cli/releases/latest/download/install.sh | bash
Manual Installation
macOS (Universal Binary):
curl -LO https://github.com/saladday/cc-switch-cli/releases/latest/download/cc-switch-cli-darwin-universal.tar.gz
tar -xzf cc-switch-cli-darwin-universal.tar.gz
chmod +x cc-switch
sudo mv cc-switch /usr/local/bin/
xattr -cr /usr/local/bin/cc-switch
Linux (x64 musl):
curl -LO https://github.com/saladday/cc-switch-cli/releases/latest/download/cc-switch-cli-linux-x64-musl.tar.gz
tar -xzf cc-switch-cli-linux-x64-musl.tar.gz
chmod +x cc-switch
sudo mv cc-switch /usr/local/bin/
Windows:
Download cc-switch-cli-windows-x64.zip, extract, and move cc-switch.exe to a directory in PATH or run directly.
Build from Source
Requires Rust 1.85+:
git clone https://github.com/saladday/cc-switch-cli.git
cd cc-switch-cli/src-tauri
cargo build --release
sudo cp target/release/cc-switch /usr/local/bin/
Core Concepts
Multi-App Architecture
cc-switch supports five apps via the global --app flag:
claude (default) — Claude Code
codex — Cursor's Codex
gemini — Gemini CLI
opencode — OpenCode
openclaw — OpenClaw
Example:
cc-switch --app codex provider list
cc-switch --app gemini prompts activate custom-preset
Interactive vs. Command Mode
Interactive Mode (TUI):
cc-switch
Navigate with arrow keys, select features, view live status.
Command Mode:
cc-switch provider switch pro-account
cc-switch mcp sync
Provider Management
Providers store API keys, base URLs, and model configurations.
List All Providers
cc-switch provider list
cc-switch --app codex provider list
Show Current Provider
cc-switch provider current
Switch Provider
cc-switch provider switch dev-api
Activates the provider named dev-api for the current app.
Add a New Provider
Interactive prompt:
cc-switch provider add
Prompts for:
- Provider name
- Base URL
- API key (or
$ENV_VAR reference)
- Model ID
Edit Existing Provider
cc-switch provider edit prod-account
Duplicate Provider
cc-switch provider duplicate staging-api
Creates a copy with -copy suffix.
Delete Provider
cc-switch provider delete old-endpoint
Export Claude Provider Settings
Export to ./.claude/settings.local.json for Claude Code auto-load:
cc-switch provider export my-provider
Custom output path:
cc-switch provider export my-provider --output ~/.claude/settings-prod.json
Speed Test
cc-switch provider speedtest my-provider
Measures API latency.
Stream Health Check
cc-switch provider stream-check my-provider
Validates streaming endpoint responsiveness.
Fetch Remote Models
cc-switch provider fetch-models my-provider
Retrieves available model list from the API endpoint.
MCP Server Management
Model Context Protocol servers extend AI assistant capabilities.
List MCP Servers
cc-switch mcp list
cc-switch --app codex mcp list
Add MCP Server
Interactive:
cc-switch mcp add
Prompts for:
- Server name
- Transport type (stdio/http/sse)
- Command/URL
- Arguments/headers
- Environment variables
- Enabled apps
Edit MCP Server
cc-switch mcp edit filesystem-server
Delete MCP Server
cc-switch mcp delete old-server
Enable/Disable for Specific App
cc-switch mcp enable postgres-mcp --app claude
cc-switch mcp disable postgres-mcp --app codex
Validate Command in PATH
cc-switch mcp validate node
cc-switch mcp validate /usr/local/bin/custom-binary
Checks if executable exists and is accessible.
Sync to Live Configs
cc-switch mcp sync
cc-switch --app gemini mcp sync
Writes enabled servers to app-specific config files (e.g., Claude's claude_desktop_config.json, Codex's config.toml).
Import from Live Config
cc-switch mcp import --app claude
Reads existing MCP servers from the app's config file into cc-switch's database.
Prompts Management
System prompt presets for AI coding assistants.
List Prompts
cc-switch prompts list
cc-switch --app gemini prompts list
Show Current Active Prompt
cc-switch prompts current
Activate a Prompt
cc-switch prompts activate rust-expert
Writes content to the app's prompt file (e.g., .claude/CLAUDE.md, .codex/AGENTS.md).
Deactivate Current Prompt
cc-switch prompts deactivate
Clears the active prompt file.
Create New Prompt
Interactive:
cc-switch prompts create
Or provide name upfront:
cc-switch prompts create typescript-tutor
Opens default editor ($EDITOR or vi) to compose content.
Rename Prompt
cc-switch prompts rename old-name new-name
Interactive if new name omitted:
cc-switch prompts rename old-name
Edit Prompt
cc-switch prompts edit rust-expert
Opens in editor.
Show Full Prompt Content
cc-switch prompts show rust-expert
Displays content in terminal.
Delete Prompt
cc-switch prompts delete outdated-preset
Skills Management
Community skills extend AI assistant capabilities via custom tooling.
List Installed Skills
cc-switch skills list
cc-switch --app codex skills list
Discover Available Skills
cc-switch skills discover database
cc-switch skills discover postgres
Searches the SSOT skills repository.
Install Skill
cc-switch skills install postgres-expert
Downloads and registers the skill.
Uninstall Skill
cc-switch skills uninstall postgres-expert
Removes from all apps and deletes local copy.
Enable/Disable for App
cc-switch skills enable postgres-expert --app claude
cc-switch skills disable postgres-expert --app codex
Scan Unmanaged Skills
cc-switch skills scan
Detects manually placed skill files in app directories.
Import Unmanaged Skill
cc-switch skills import custom-tool --app claude
Registers existing skill file into cc-switch database.
Show Skill Content
cc-switch skills show postgres-expert
Sync Skills to Apps
cc-switch skills sync
Copies enabled skills to each app's .skills/ directory.
Refresh Repository
cc-switch skills refresh-repo
Updates local cache of available skills.
Proxy Management
Local reverse proxy for multi-provider routing.
Show Proxy Configuration
cc-switch proxy show
Displays routes, target endpoints, and proxy status.
Start Proxy Server
cc-switch proxy start
Launches on configured port (default: 8080).
Stop Proxy Server
cc-switch proxy stop
Add Route
Interactive:
cc-switch proxy add-route
Prompts for path prefix and target provider.
Remove Route
cc-switch proxy remove-route /api/claude
WebDAV Sync
Synchronize cc-switch data across machines.
Show WebDAV Configuration
cc-switch config webdav show
Configure WebDAV
Interactive setup:
cc-switch config webdav setup
Prompts for:
- WebDAV URL
- Username
- Password
- Sync directory
Enable/Disable WebDAV Sync
cc-switch config webdav enable
cc-switch config webdav disable
Trigger Manual Sync
cc-switch config webdav sync
Uploads local changes and downloads remote updates.
Environment Diagnostics
Check Local CLI Tools
cc-switch env tools
Validates presence of:
- Node.js
- Python
- npx
- uv
- Common shells
Validate Installation
cc-switch env validate
Runs comprehensive checks on config files, permissions, and app directories.
Configuration Files
cc-switch stores data in:
- macOS/Linux:
~/.config/cc-switch/
- Windows:
%APPDATA%\cc-switch\
Key files:
config.json — Main settings
providers.json — API providers
mcp_servers.json — MCP server definitions
prompts.json — Prompt presets
skills.json — Skill metadata
App-specific files:
- Claude:
~/.claude/claude_desktop_config.json, ~/.claude/CLAUDE.md
- Codex:
~/.codex/config.toml, ~/.codex/AGENTS.md
- Gemini:
~/.gemini/gemini.toml, ~/.gemini/GEMINI.md
- OpenCode:
~/.opencode/config.toml, ~/.opencode/AGENTS.md
- OpenClaw:
~/.openclaw/config.toml, ~/.openclaw/AGENTS.md
Common Workflows
Switching Between Development and Production APIs
cc-switch provider list
cc-switch provider switch prod-api
cc-switch provider current
Setting Up MCP Servers for Claude
cc-switch mcp add
cc-switch mcp enable filesystem-server --app claude
cc-switch mcp sync
Activating a Custom Prompt Preset
cc-switch prompts create senior-rust-dev
cc-switch --app claude prompts activate senior-rust-dev
cat ~/.claude/CLAUDE.md
Installing Community Skills
cc-switch skills discover postgres
cc-switch skills install postgres-mcp
cc-switch skills enable postgres-mcp --app codex
cc-switch skills sync
Exporting Provider for Standalone Use
cc-switch provider export my-provider
cc-switch provider export my-provider --output ~/Desktop/claude-config.json
Troubleshooting
Provider Switch Not Taking Effect
Ensure sync has run:
cc-switch mcp sync
cc-switch prompts activate <current-prompt>
Restart the AI assistant app.
MCP Server Not Showing Up
Check PATH for the command:
cc-switch mcp validate npx
Verify enabled apps:
cc-switch mcp list
Re-sync:
cc-switch mcp sync
Prompt File Not Updated
Confirm prompt is activated:
cc-switch prompts current
Manually activate:
cc-switch prompts activate <name>
Check file exists:
cat ~/.claude/CLAUDE.md
Skill Not Available in Assistant
Ensure enabled for correct app:
cc-switch skills enable <skill-name> --app claude
Sync skills:
cc-switch skills sync
Restart assistant.
WebDAV Sync Failing
Verify credentials:
cc-switch config webdav show
Test connection:
cc-switch config webdav sync
Check network/firewall settings.
Permission Errors
Ensure config directory is writable:
ls -la ~/.config/cc-switch/
chmod -R u+w ~/.config/cc-switch/
On macOS, grant Full Disk Access to Terminal in System Preferences > Privacy & Security.
Environment Variables
CC_SWITCH_INSTALL_DIR — Install location (default: ~/.local/bin)
CC_SWITCH_FORCE — Force overwrite during install (1 to enable)
CC_SWITCH_LINUX_LIBC — Linux libc variant (glibc or musl, default: musl)
EDITOR — Text editor for prompt/skill editing (default: vi)
Example: Multi-App Provider Workflow
cc-switch provider add
cc-switch --app claude provider switch shared-api
cc-switch --app codex provider switch shared-api
cc-switch --app claude provider current
cc-switch --app codex provider current
Example: Creating a Custom Skill
cc-switch skills create --name custom-debugger
cc-switch skills enable custom-debugger --app claude
cc-switch skills enable custom-debugger --app codex
cc-switch skills sync
Example: Testing API Health
cc-switch provider speedtest prod-api
cc-switch provider stream-check prod-api
cc-switch provider fetch-models prod-api
Integration with CI/CD
Export provider config for automated setups:
#!/bin/bash
curl -fsSL https://github.com/SaladDay/cc-switch-cli/releases/latest/download/install.sh | bash
cc-switch provider add \
--name ci-api \
--base-url "$CI_API_URL" \
--api-key "$CI_API_KEY" \
--model claude-3-5-sonnet-20241022
cc-switch provider switch ci-api
cc-switch provider export ci-api --output ./claude-settings.json
This skill enables AI coding agents to help developers install, configure, and operate cc-switch-cli across all supported AI assistant platforms with real command examples and practical workflows.