ccswitch-tui
v1.0.0
Published
Server-side TUI tool for managing Claude Code & Codex providers - switch providers, manage API keys, configure models from the terminal
Downloads
645
Maintainers
Readme
CC Switch CLI
Server-side TUI tool for managing Claude Code & Codex providers
A terminal-based interactive tool that lets you configure and switch AI coding assistant providers directly from VSCode's integrated terminal. No GUI required.
Built for developers working on headless servers, remote devcontainers, and SSH sessions where the CC Switch desktop app can't run.
Features
- 55+ Claude Code presets & 47+ Codex presets — same as CC Switch official
- One-click switching — writes to
~/.claude/settings.jsonor~/.codex/auth.json+config.toml - Provider CRUD — add, edit, delete providers with preset templates
- Model configuration — auto-fills from presets, fully editable
- Status view — see active provider, config file paths, masked API keys
- Zero GUI dependency — runs in any terminal, including VSCode integrated terminal
Install
From npm (recommended)
npm install -g ccswitch-tui
ccswitchFrom GitHub
git clone https://github.com/nicepkg/ccswitch-cli.git
cd ccswitch-cli
npm install # prepare hook auto builds
npm link # register global command
ccswitch # launchUsage
┌─ CC Switch CLI ──────────────────────────────────┐
│ │
│ 当前激活: [Claude] my-anthropic │
│ │
│ ► 管理 Providers │
│ 切换 Provider │
│ 查看状态 │
│ 退出 │
│ │
│ ↑↓ 移动 Enter 选择 │
└───────────────────────────────────────────────────┘Navigation
| Key | Action |
|-----|--------|
| ↑ / ↓ | Navigate list |
| Enter | Select / Confirm |
| Tab | Switch form fields |
| a | Add new provider |
| e | Edit selected provider |
| d | Delete selected provider |
| q / Esc | Go back / Exit |
Workflow
- Add provider — Select app type (Claude Code / Codex) → pick a preset → fill name, API key, and model → save
- Switch — Select target provider → Enter → config files updated instantly
- View status — See current active provider details and all providers overview
Supported Providers
All presets are ported from CC Switch official configuration:
Claude Code (55+ presets): Anthropic Official, OpenRouter, DeepSeek, Zhipu GLM, Kimi, StepFun, MiniMax, SiliconFlow, 火山 Agentplan, BytePlus, 百度千帆, 百炼, AiHubMix, DMXAPI, PackyCode, Cubence, AIGoCode, AWS Bedrock, and many more.
Codex (47+ presets): OpenAI Official, DeepSeek, Zhipu GLM, Kimi, StepFun, MiniMax, SiliconFlow, 火山 Agentplan, Azure OpenAI, OpenRouter, AiHubMix, and many more.
How It Works
Claude Code
Writes provider config to ~/.claude/settings.json, merging into the env section:
ANTHROPIC_AUTH_TOKENorANTHROPIC_API_KEYANTHROPIC_BASE_URLANTHROPIC_MODEL,ANTHROPIC_DEFAULT_SONNET_MODEL, etc.
Codex
Writes to two files:
~/.codex/auth.json— API key (OPENAI_API_KEY)~/.codex/config.toml— Provider config (base_url,model,model_provider, etc.)
Config Storage
Provider data stored in ~/.ccswitch-cli/providers.json.
Development
# Clone
git clone https://github.com/nicepkg/ccswitch-cli.git
cd ccswitch-cli
# Install dependencies
npm install
# Run in development
npm run dev
# Build
npm run build
# Type check
npm run typecheckRelated
- CC Switch — Desktop GUI version (Tauri + React)
- Claude Code — Anthropic's CLI coding assistant
- Codex — OpenAI's CLI coding assistant
License
MIT
