opencode-command-code-provider
v0.4.1
Published
OpenCode provider plugin for Command Code — native API translation for the CLI coding agent
Maintainers
Readme
opencode-command-code-provider
Command Code provider for OpenCode — translates OpenAI-compatible requests to the native /alpha/generate API.
Install
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-command-code-provider"],
"provider": {
"commandcode": {
"npm": "@ai-sdk/openai-compatible",
"name": "Command Code",
"options": { "baseURL": "https://api.commandcode.ai/v1" }
}
}
}Setup
- Restart OpenCode for config to take effect.
- Add your API key —
/connect→ select Command Code → paste key from commandcode.ai/studio/api-keys. - Select a model —
/modelslists all models;/model deepseek/deepseek-v4-flash.
How it works
When OpenCode sends a request, the plugin intercepts it via the auth loader:
OpenCode → @ai-sdk/openai-compatible (prepares /v1/chat/completions)
→ plugin custom fetch (translates to CC format)
→ api.commandcode.ai/alpha/generate (streams events back)
→ plugin translates text-delta/reasoning-delta/tool-call/finish
→ OpenCode receives OpenAI-shaped SSELicense
MIT
