Publisher install

Install Soko for OpenCode.

Back to dashboard

1. Create a publisher credential

Create an OpenCode credential from your dashboard. The API key is shown once, so keep it in your local OpenCode config or secret manager.

No credentials yet.

2. Add the plugin to OpenCode

Add the plugin package to ~/.config/opencode/tui.json with your publisher ID and one-time API key. OpenCode loads its TUI entrypoint automatically.

{
  "plugin": [
    ["@soko/opencode-plugin", {
      "enabled": true,
      "publisherId": "pub_...",
      "publisherApiKey": "soko_pub_...",
      "contextTags": ["ai-agent", "opencode"]
    }]
  ]
}

3. Local smoke setup

For local smoke tests, point ~/.config/opencode/tui.json directly at the TSX source tuple. Do not build a dist shim for this path.

{
  "plugin": [
    ["file:///absolute/path/to/soko/packages/opencode-soko-plugin/src/index.tsx", {
      "enabled": true,
      "baseUrl": "http://127.0.0.1:8787",
      "publisherId": "pub_demo",
      "publisherApiKey": "soko_pub_...",
      "contextTags": ["ai-agent", "opencode"]
    }]
  ]
}

4. Verify a placement

Start an OpenCode session and let it run for at least five seconds. The plugin uses the app-bottom slot to show a Soko text placement, then records the impression when the session returns idle.

opencode-tuisurface
5 secminimum view
allowlisted tags onlycontext