Skip to content

OpenCode

Connect OpenCode to Trurlic so every implementation task is constrained by your architectural decisions.

  • Trurlic installed and .trurlic/ initialized in your project
  • OpenCode installed

The fastest way:

Terminal window
trurlic install --ide opencode

This writes to ~/.config/opencode/opencode.json (or $XDG_CONFIG_HOME/opencode/opencode.json if set).

Add to your opencode.json:

{
"mcp": {
"trurlic": {
"type": "local",
"command": "trurlic",
"args": ["serve"]
}
}
}

Add Trurlic instructions to your project’s agent rules so OpenCode queries the decision graph before generating code. See MCP Server for the recommended instruction block.

  1. Start an OpenCode session in the project directory.
  2. Ask OpenCode to implement a feature — it should query get_context and follow your recorded decisions.
  3. Check trurlic status for consistency.