OpenCode
| Target id | Package | Ship with |
|---|---|---|
opencode |
@oiap/exporter-opencode |
install-agent-plugin |
npx oiap build oiap.plugin.ts --target opencode --out dist/opencodenpx install-agent-plugin <owner>/<repo> --plugin <plugin-id> --agent opencodeOpenCode target exporter for Open Interoperable Agent Plugins.
The exporter renders project-local OpenCode configuration and companion assets:
opencode.jsonfor schema, instruction references, MCP servers, and permissions.AGENTS.mdand.opencode/instructions/for project rules..opencode/skills/for native Agent Skills..opencode/commands/for slash command prompt templates..opencode/agents/for custom primary/subagent prompt files..opencode/plugins/oiap-hooks.jsfor plugin hooks backed by the OIAP generated runtime.
Most authors should use the CLI:
bun run oiap build ./oiap.plugin.ts --target opencode --out ./build/opencodeThe output is a bundle artifact only. It does not install files into a user’s global OpenCode config directory or enable host-managed settings.
Install paths
Section titled “Install paths”Where install-agent-plugin and installPlugin() write the bundle, from the target profile. --out <dir> overrides them.
| Scope | Path |
|---|---|
| Local (default) | ./.opencode/plugins/<plugin-id> |
Global (--global) |
~/.config/opencode/plugins/<plugin-id> |
Support matrix
Section titled “Support matrix”From the platform support matrix (see its legend).
| Profile | Package | Rules | Skills | Commands | Hooks | Agents | MCP | Runtime | Policy |
|---|---|---|---|---|---|---|---|---|---|
| bridge | P | Y | Y | Y | P | Y | Y | R | P |
Platform notes
Section titled “Platform notes”Bridge target. OpenCode documents project opencode.json, AGENTS.md,
.opencode/skills, .opencode/commands, .opencode/agents, local or npm
plugins, local and remote MCP servers, and permission rules. OIAP exports those
project-local assets and uses a bundled JavaScript OpenCode plugin bridge for
supported hook events.