
cc-switch-cli
Cross-platform CLI tool for managing Claude Code, Codex, Gemini, OpenCode & OpenClaw providers, MCP servers, prompts, skills, and proxies.
- Installs
- 316
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/reason-machines/devtools-skills --skill cc-switch-cli- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads cc-switch-cli automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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 # Remove quarantine attribute
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 Codecodex— Cursor's Codexgemini— Gemini CLIopencode— OpenCodeopenclaw— 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 # Codex-specific
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_VARreference) - 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 settingsproviders.json— API providersmcp_servers.json— MCP server definitionsprompts.json— Prompt presetsskills.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
# List providers
cc-switch provider list
# Switch to production
cc-switch provider switch prod-api
# Verify
cc-switch provider current
Setting Up MCP Servers for Claude
# Add filesystem MCP
cc-switch mcp add
# Select stdio, command: npx, args: -y @modelcontextprotocol/server-filesystem ~/projects
# Enable for Claude
cc-switch mcp enable filesystem-server --app claude
# Sync to live config
cc-switch mcp sync
Activating a Custom Prompt Preset
# Create new prompt
cc-switch prompts create senior-rust-dev
# Edit content in $EDITOR
# Activate for Claude
cc-switch --app claude prompts activate senior-rust-dev
# Verify
cat ~/.claude/CLAUDE.md
Installing Community Skills
# Discover available skills
cc-switch skills discover postgres
# Install
cc-switch skills install postgres-mcp
# Enable for Codex
cc-switch skills enable postgres-mcp --app codex
# Sync
cc-switch skills sync
Exporting Provider for Standalone Use
# Export current provider to Claude auto-load location
cc-switch provider export my-provider
# Or custom path
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 (1to enable)CC_SWITCH_LINUX_LIBC— Linux libc variant (glibcormusl, default:musl)EDITOR— Text editor for prompt/skill editing (default:vi)
Example: Multi-App Provider Workflow
# Add a shared API provider
cc-switch provider add
# Name: shared-api
# Base URL: https://api.example.com/v1
# API key: $MY_API_KEY
# Model: claude-3-5-sonnet-20241022
# Switch Claude to this provider
cc-switch --app claude provider switch shared-api
# Switch Codex to the same provider
cc-switch --app codex provider switch shared-api
# Verify both
cc-switch --app claude provider current
cc-switch --app codex provider current
Example: Creating a Custom Skill
# Create new skill
cc-switch skills create --name custom-debugger
# Edit in $EDITOR, add content:
# ---
# name: custom-debugger
# description: Advanced debugging patterns for Rust
# triggers:
# - "debug this Rust code"
# - "add debugging instrumentation"
# ---
# # Custom Debugger Skill
# Use `dbg!()` for quick variable inspection...
# Save and exit editor
# Enable for Claude and Codex
cc-switch skills enable custom-debugger --app claude
cc-switch skills enable custom-debugger --app codex
# Sync
cc-switch skills sync
Example: Testing API Health
# Speed test
cc-switch provider speedtest prod-api
# Stream health check
cc-switch provider stream-check prod-api
# Fetch available models
cc-switch provider fetch-models prod-api
Integration with CI/CD
Export provider config for automated setups:
#!/bin/bash
# ci-setup.sh
# Install cc-switch
curl -fsSL https://github.com/SaladDay/cc-switch-cli/releases/latest/download/install.sh | bash
# Add CI provider
cc-switch provider add \
--name ci-api \
--base-url "$CI_API_URL" \
--api-key "$CI_API_KEY" \
--model claude-3-5-sonnet-20241022
# Switch to it
cc-switch provider switch ci-api
# Export for downstream tools
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.
FAQ
What does the cc-switch-cli skill do?
Cross-platform CLI tool for managing Claude Code, Codex, Gemini, OpenCode & OpenClaw providers, MCP servers, prompts, skills, and proxies.
How do I install cc-switch-cli?
Run npx skills add https://github.com/reason-machines/devtools-skills --skill cc-switch-cli in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/cc-switch-cli/ (personal) or .claude/skills/cc-switch-cli/ (project).
Which AI agents can use cc-switch-cli?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is cc-switch-cli safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains cc-switch-cli?
It is published by reason-machines in reason-machines/devtools-skills. It has 316 recorded installs.
More from reason-machines/devtools-skills
wx-cli-wechat-local-data
reason-machines/devtools-skills
Open the skill to read its SKILL.md instructions.
chrome-devtools-mcp-automation
reason-machines/devtools-skills
Open the skill to read its SKILL.md instructions.
officecli-office-automation
reason-machines/devtools-skills
Open the skill to read its SKILL.md instructions.
autocli-web-scraping
reason-machines/devtools-skills
Open the skill to read its SKILL.md instructions.
cli-anything-agent-native-software
reason-machines/devtools-skills
Open the skill to read its SKILL.md instructions.
opencli-universal-cli-hub
reason-machines/devtools-skills
Open the skill to read its SKILL.md instructions.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available