Command Code API provider for opencode. Use Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, MiniMax, Step, and other models through a single API key.
opencode plugin commandcode-go-opencode-providerThis installs the provider and registers all available models automatically.
Run /connect in opencode, search for Command Code, and enter your API key:
/connect
Run /models to pick from available models:
/models
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.
Set COMMANDCODE_API_KEY instead of using /connect:
COMMANDCODE_API_KEY=your-key opencodeFull model list is maintained in models.json. Run bun run sync to refresh from the latest Command Code CLI release on npm.
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.
bun run sync # update models.json from Command Code
bun run sync:global # update models.json + write to ~/.config/opencode/opencode.jsoncMIT
