Skip to content

Installing

You need OpenCode 2. Older versions have a different plugin API and won’t load it.

  1. Add the plugin to your opencode.json. Put it in the project if only that repo needs it, or in ~/.config/opencode/opencode.json if you want it everywhere.

    opencode.json
    {
    "$schema": "https://opencode.ai/config.json",
    "plugins": ["@mucsi96/opencode-copilot-bridge"]
    }
  2. Start OpenCode in a repo that has Copilot files. OpenCode installs the package from npm the first time.

  3. Check it worked. Type / and your prompt files should be in the list. Press Tab to cycle agents and your Copilot agents should be there too.

The defaults are fine for most people. If you want to change something, use the object form:

opencode.json
{
"plugins": [
{
"package": "@mucsi96/opencode-copilot-bridge",
"options": {
// also load ~/.copilot, not just the project (default: true)
"userConfig": true,
// skip parts you don't want: instructions, prompts, skills, agents, mcp
"disable": ["mcp"],
// values for ${input:...} in MCP configs
"inputs": { "region": "eu-west-1" },
// map Copilot model names that don't translate on their own
"models": { "Claude Sonnet 4.5 (copilot)": "anthropic/claude-sonnet-4-5" },
// provider for models derived from Copilot names (default: "github-copilot")
"modelProvider": "github-copilot",
// diagnostics log; false turns it off (default: ~/.local/state/opencode/copilot-bridge.log)
"logFile": false,
// reload when files change (default: true)
"watch": true
}
}
]
}

Copilot asks you for ${input:...} values in a popup. OpenCode can’t do that, so the plugin looks for a value here, in this order:

  1. the inputs option above
  2. an env var called COPILOT_BRIDGE_INPUT_<ID>, so api-key becomes COPILOT_BRIDGE_INPUT_API_KEY
  3. the default in mcp.json

For API keys please use the env var. Don’t put them in opencode.json, it tends to end up in git. If none of the three has a value, that server is skipped.