Connecting OpenCode
Using Claude Code? See Connecting Claude Code.
How It Works
When you run ./install.sh --target=opencode, it handles the full connection setup:
- Instance selection — Choose Tandemu Cloud or provide a self-hosted URL
- Browser authorization — Your browser opens to the Tandemu dashboard. Log in and click Allow.
- Auth saved — Token and org info saved to
~/.config/tandemu/auth.json - Plugin registered —
@tandemu/opencode-pluginadded to~/.config/opencode/opencode.json - Memory configured — MCP server registered in the same
opencode.json, scoped to your user - Skills installed —
/morning,/finish,/pause,/standup,/createcopied into~/.config/opencode/skills/ - Personality —
~/.config/opencode/AGENTS.mdwritten
Bun auto-installs the plugin from npm on the next opencode launch.
Installation Methods
Install script
git clone https://github.com/sebastiangrebe/tandemu.git
cd tandemu
./install.sh --target=opencodeThe installer authenticates you and configures everything.
Manual
If you prefer to wire up opencode.json yourself, the minimal config is:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@tandemu/opencode-plugin"]
}You’ll still need to run ./install.sh --target=opencode (or the in-editor /setup command) once to configure auth and the MCP memory server.
Configuration Files
The setup creates these files:
~/.config/tandemu/auth.json
Authentication and API config, shared across all repos:
{
"auth": { "token": "eyJhbG..." },
"user": { "id": "uuid", "email": "you@company.com", "name": "Your Name" },
"organization": { "id": "uuid", "name": "Acme Engineering" },
"teams": [{ "id": "uuid", "name": "Frontend Team" }],
"api": { "url": "https://api.tandemu.dev" }
}~/.config/opencode/opencode.json
Plugin registration and MCP memory server, deep-merged with any existing config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@tandemu/opencode-plugin"],
"mcp": {
"tandemu-memory": {
"type": "remote",
"url": "https://memory.tandemu.dev/mcp/tandemu/sse/<your-user-id>",
"headers": { "Authorization": "Bearer {env:TANDEMU_TOKEN}" },
"enabled": true
}
}
}The plugin emits opencode.cost.usage, opencode.token.usage, and opencode.lines_of_code.count OTLP metrics directly to the Tandemu backend — no separate OTEL config needed.
~/.config/opencode/AGENTS.md
Personality file. The plugin updates the section between <!-- tandemu:personality:start --> and <!-- tandemu:personality:end --> markers on every session start, pulling your personality memories from the Tandemu backend so the agent uses your name and matches your communication style.
~/.config/opencode/skills/
Skill definitions (morning, finish, pause, create, standup, setup) copied from the Tandemu repo. Same content as the Claude Code plugin — Tandemu skills are editor-agnostic markdown.
~/.config/opencode/commands/
Slash command shims that proxy to the skills above (/morning, /finish, etc.).
Reconnecting
If your token expires (30 days) or you need to switch organizations, run the installer again:
./install.sh --target=opencodeIt detects existing config and re-authorizes.
Troubleshooting
/morning not found — Restart your opencode session after install. Skills load on startup.
Plugin not loading — Check ~/.config/opencode/opencode.json has "plugin": ["@tandemu/opencode-plugin"]. Bun auto-installs on launch; if install fails, run bun install @tandemu/opencode-plugin in ~/.cache/opencode/ (or wherever Bun caches OpenCode plugins).
Browser doesn’t open — Copy the URL from installer output and open it manually.
“Could not reach Tandemu API” — Check that your Tandemu instance is running and the URL is correct.
Token expired — Run ./install.sh --target=opencode again to re-authorize.