CC Switch Provider Management
Use ccswitch-cli to manage AI provider configurations for Claude Code and OpenCode when working in SSH environments.
Installation
# Install CLI
brew tap FrankieeW/homebrew-tap && brew install ccswitch-cli
# Install skill for AI agents
npx -g skills add https://github.com/FrankieeW/agent-skills
Usage
CLI Commands
# List available providers
ccswitch-cli list claude
ccswitch-cli list opencode
# Switch provider (dry-run first)
ccswitch-cli switch claude --provider openrouter --dry-run
# Apply switch
ccswitch-cli switch claude --provider openrouter
# Show current configuration
ccswitch-cli current claude
# Check provider health
ccswitch-cli health claude
AI Mode
For AI agents, use XML output mode for better parsing:
ccswitch-cli --ai list claude
ccswitch-cli --ai switch claude --provider openrouter --dry-run
Supported Apps
| App | Description |
|---|---|
claude |
Claude Code (Anthropic) |
opencode |
OpenCode |
Provider Switching Workflow
- List available providers:
ccswitch-cli list <app> - Preview changes with
--dry-run - Apply with
ccswitch-cli switch <app> --provider <id>
Examples
Switching to OpenRouter for Claude Code
# Check current
ccswitch-cli --ai current claude
# Preview switch
ccswitch-cli --ai switch claude --provider openrouter --dry-run
# Apply
ccswitch-cli --ai switch claude --provider openrouter
Checking Health Status
ccswitch-cli --ai health claude
Database
The CLI reads from CC Switch's SQLite database at ~/.cc-switch/cc-switch.db.