A CLI tool for managing multiple Claude API configurations via a Provider-Profile architecture, configuring both Claude Code and OpenCode simultaneously.
- Provider-Profile architecture: separate API endpoint definitions from user configurations
- Switch profiles to update Claude Code and OpenCode configs at once
- Secure API key management with strict file permissions (0o600/0o700)
- Interactive CLI with Inquirer.js
- WebUI management dashboard
- Built-in configuration diagnostics (
cce doctor)
npm install -g @mengzai1/cceRequires Node.js >= 16.0.0.
# 1. Initialize config directory (~/.config/cce)
cce init
# 2. Add a provider (e.g. Volcano Engine)
cce provider add volcano
# 3. Create a profile referencing the provider
cce create work
# 4. Activate the profile
cce use work| Command | Alias | Description |
|---|---|---|
cce init |
Initialize the configuration directory | |
cce create <name> |
Create a new profile (interactively select a provider) | |
cce use [name] |
Activate a profile (interactive selection if name is omitted) | |
cce list |
ls |
List all profiles |
cce current |
c |
Show the currently active profile |
cce show <name> |
Show profile details | |
cce edit <name> |
Edit a profile | |
cce remove <name> |
rm |
Remove a profile |
| Command | Description |
|---|---|
cce provider add <type> |
Add a new provider |
cce provider list |
List all providers |
cce provider show <name> |
Show provider details |
cce provider edit <name> |
Edit a provider |
cce provider remove <name> |
Remove a provider |
Supported provider types: openai-compatible, anthropic-compatible, custom
| Command | Description |
|---|---|
cce doctor |
Check configuration for issues |
cce ui |
Launch the WebUI dashboard |
cce ui options:
-p, --port <port>— specify a port--no-open— don't auto-open the browser
Profile (references) -> Provider (resolves) -> EffectiveConfig (generates) -> Config Files
When you run cce use <profile>:
- Loads the profile and resolves the referenced provider
- Merges into an
EffectiveConfig(baseURL, apiKey, model) - Writes Claude Code config (
~/.claude/settings.json) and OpenCode config (~/.config/opencode/opencode.json)
~/.config/cce/
├── providers/ # Provider definitions
│ └── volcano-prod.json
├── profiles/ # User profiles
│ └── work.json
└── active # Currently active profile name
{
"name": "volcano-prod",
"displayName": "Volcano Engine Production",
"type": "openai-compatible",
"baseURL": "https://ark.cn-beijing.volces.com/api/v3",
"apiKey": "your-api-key",
"models": ["ep-20250101-xxxx", "ep-20250201-yyyy"],
"defaultModel": "ep-20250201-yyyy"
}{
"name": "work",
"description": "Work environment",
"provider": "volcano-prod",
"model": "ep-20250101-xxxx",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z"
}Q: What does cce use actually modify?
A: It writes to ~/.claude/settings.json (Claude Code) and ~/.config/opencode/opencode.json (OpenCode).
Q: How are API keys secured?
A: The ~/.config/cce directory is set to 700, config files to 600 (owner read/write only).
Q: Can I override the model in a profile?
A: Yes. A profile can specify a model field to override the provider's defaultModel.
MIT