A GUI config manager for CodeWhale
Switch providers · models · API keys · save presets — all with a click
Features · Quick Start · Usage · Screenshots · Development · 中文版
cw-switch is a desktop GUI configuration manager for CodeWhale, inspired by cc-switch (the popular config tool for Claude Code).
CodeWhale defaults to using DeepSeek V4 Pro, which is overkill for casual learning/light use. Switching models means typing commands or hand-editing TOML files. cw-switch gives you a visual interface in your browser — click, not type.
| Feature | Description |
|---|---|
| ⚡ One-click model switch | Flash / Pro / Auto — instant apply |
| 🔄 Provider switching | 20+ providers with auto-updating model lists & base URLs |
| 🔑 API key management | Add / edit / delete keys per provider, stored securely |
| 🎚 Reasoning effort slider | off → low → medium → high → max |
| 💾 Profile presets | Save config snapshots, load them back anytime |
| 🔧 Advanced settings | Memory, sandbox mode, allow shell, subagents |
| 🚀 Launch CodeWhale | Start CodeWhale TUI directly from the tool |
npm install -g codewhale# 1. Clone or download
git clone https://github.com/huhu618835/cw-switch.git
cd cw-switch
# 2. Install dependencies
npm install
# 3. Start
npm start
# or double-click start.bat (Windows)Your browser will open at http://127.0.0.1:<random-port>. The GUI is ready.
Press Ctrl+C to stop the server.
- Launch cw-switch
- Click "⚡ Flash" or "🚀 Pro" in the Quick Actions panel
- Click "✕ Apply Changes" at the bottom
- ✅ Done!
- Select a provider from the dropdown (e.g.,
OpenAI,HuggingFace) - Model list and base URL update automatically
- Set the API key (click "Manage")
- Apply changes
- Configure your ideal setup (e.g., Flash + low reasoning effort)
- Enter a name in the "Profiles" section (e.g.,
lightweight) - Click "Save"
- Load it anytime with one click
Main configuration interface — switch providers, models, API keys at a glance
Switched to Flash model — config applied and ready
cw-switch/
├── server.js # Express backend, 13 REST API endpoints
├── public/
│ └── index.html # Single-page frontend (vanilla HTML/CSS/JS)
├── package.json
├── start.bat # Windows quick-start script
├── README.md # English
├── README.zh-CN.md # Chinese
└── .gitignore
- Backend: Node.js + Express
- Frontend: Vanilla HTML/CSS/JS (zero dependencies, zero build step)
- Config access: Via
codewhale CLIcommands + directsecrets.jsonread/write
| Method | Path | Description |
|---|---|---|
| GET | /api/status |
Config summary |
| GET | /api/config |
Full config |
| PUT | /api/config |
Write single key |
| POST | /api/config/batch |
Batch write |
| GET | /api/auth/:provider |
Check API key status |
| POST | /api/auth/:provider |
Set API key |
| DELETE | /api/auth/:provider |
Delete API key |
| GET | /api/providers |
Known providers list |
| GET | /api/models |
Available models |
| GET/POST/PUT/DELETE | /api/profiles/* |
Profile management |
| POST | /api/launch |
Launch CodeWhale |
- cw-switch listens only on
127.0.0.1(localhost) — no network exposure - API keys are stored in
~/.codewhale/secrets/secrets.json - Complex TOML structures (
projects,http_headers) are protected from accidental corruption - If
config.tomlgets corrupted, the tool will attempt auto-recovery
- Hmbown/CodeWhale — the amazing open-source coding agent
- kongkongyo/cc-switch — UI inspiration