commandcode-go-opencode-provider
v0.4.0
Published
Command Code API provider for opencode — use Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, MiniMax, and Step models via Command Code
Downloads
1,019
Maintainers
Readme
commandcode-go-opencode-provider
Command Code API provider for opencode. Use Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, MiniMax, Step, and other models through a single API key.
Quick Start
1. Install
opencode plugin commandcode-go-opencode-providerThis installs the provider and registers all available models automatically.
2. Connect
Run /connect in opencode, search for Command Code, and enter your API key:
/connect3. Select a model
Run /models to pick from available models:
/modelsManual Configuration
If you prefer to configure manually, add this to your opencode.json:
{
"plugin": ["commandcode-go-opencode-provider/server"],
"provider": {
"commandcode": {
"npm": "commandcode-go-opencode-provider",
"name": "Command Code",
"env": ["COMMANDCODE_API_KEY"]
}
},
"model": "commandcode/deepseek-v4-flash"
}The plugin auto-registers models from models.json at startup. You only need the provider.commandcode block — no need to list individual models.
Environment Variable
Set COMMANDCODE_API_KEY instead of using /connect:
COMMANDCODE_API_KEY=your-key opencodeAvailable Models
| Model ID | Name | Tier | Reasoning | Context |
|---|---|---|---|---|
| claude-haiku-4-5-20251001 | Claude Haiku 4.5 | premium | no | 200K |
| claude-opus-4-7 | Claude Opus 4.7 | premium | yes | 1M |
| claude-sonnet-4-6 | Claude Sonnet 4.6 | premium | yes | 1M |
| gpt-5.3-codex | GPT-5.3 Codex | premium | yes | 400K |
| gpt-5.4 | GPT-5.4 | premium | yes | 400K |
| gpt-5.4-mini | GPT-5.4 Mini | premium | yes | 400K |
| gpt-5.5 | GPT-5.5 | premium | yes | 256K |
| deepseek/deepseek-v4-flash | DeepSeek V4 Flash | open-source | yes | 1M |
| deepseek/deepseek-v4-pro | DeepSeek V4 Pro | open-source | yes | 1M |
| google/gemini-3.1-flash-lite | Gemini 3.1 Flash Lite | open-source | yes | 1M |
| google/gemini-3.5-flash | Gemini 3.5 Flash | open-source | yes | 1M |
| zai-org/GLM-5 | GLM-5 | open-source | no | 200K |
| zai-org/GLM-5.1 | GLM-5.1 | open-source | no | 200K |
| moonshotai/Kimi-K2.5 | Kimi K2.5 | open-source | no | 256K |
| moonshotai/Kimi-K2.6 | Kimi K2.6 | open-source | no | 256K |
| MiniMaxAI/MiniMax-M2.5 | MiniMax M2.5 | open-source | no | 200K |
| MiniMaxAI/MiniMax-M2.7 | MiniMax M2.7 | open-source | no | 1M |
| Qwen/Qwen3.6-Max-Preview | Qwen 3.6 Max Preview | open-source | yes | 1M |
| Qwen/Qwen3.6-Plus | Qwen 3.6 Plus | open-source | yes | 1M |
| Qwen/Qwen3.7-Max | Qwen 3.7 Max | open-source | yes | 1M |
| stepfun/Step-3.5-Flash | Step 3.5 Flash | open-source | yes | 1M |
Full model list is maintained in models.json. Run bun run sync to refresh from the latest Command Code CLI release on npm.
Development
git clone https://github.com/brent-weatherall/commandcode-go-opencode-provider.git
cd commandcode-go-opencode-provider
bun installFor local testing, create opencode.local.json (gitignored) with file:// paths:
{
"plugin": ["file:///path/to/commandcode-go-opencode-provider/server"],
"provider": {
"commandcode": {
"npm": "file:///path/to/commandcode-go-opencode-provider",
"name": "Command Code (local)",
"env": ["COMMANDCODE_API_KEY"]
}
}
}Run opencode --config opencode.local.json to test with your local build.
Sync Models
bun run sync # update models.json from Command Code
bun run sync:global # update models.json + write to ~/.config/opencode/opencode.jsoncLicense
MIT
