OpenCode
ototo init sets Otōto up in OpenCode when OpenCode is on the machine (opencode on the
PATH, or its config directory), beside Claude Code or on its own. This page says what it changes.
What we ran (11 October 2026): OpenCode 1.18.30 with Otōto 2026.19 on a Mac, set up by ototo init:
opencode mcp list shows ototo connected, and ototo doctor passes its checks for OpenCode. The figures on
ototo.dev were measured with Claude Code, and we have none of our own for OpenCode. A
tester runs it with one model on both sides, Qwen as OpenCode’s model and as Otōto’s small model, and finds the main
context stays small and on the task through long sessions.
Set up
ototo init
finds a model server, tests it, lists what it will change and asks before it writes (--dry-run only lists). Each
file it changes is backed up first, as <file>.before-ototo-<time>. Then start a new OpenCode session.
What it changes
OpenCode’s global config, ~/.config/opencode/opencode.json (under $XDG_CONFIG_HOME when that is set), gains
three things. Everything else in it stays as it was.
{
"mcp": {
"ototo": { "type": "local", "command": ["/home/you/.local/bin/ototo", "serve"], "enabled": true, "timeout": 1800000 }
},
"instructions": ["/home/you/.config/ototo/opencode.md"],
"permission": {
"grep": "deny",
"glob": "deny",
"bash": { "grep *": "deny", "rg *": "deny", "find *": "deny", "git grep *": "deny" }
}
}
mcp.ototo: the server, with thirty minutes for a call. OpenCode otherwise gives up on a tool call after about a minute, and anaskcan take longer.instructions: Otōto’s own file,~/.config/ototo/opencode.md, added to the list. It says when to use each tool, by the names OpenCode gives them (ototo_ask,ototo_read,ototo_search…). AnAGENTS.mdof yours, and OpenCode’s fallback to~/.claude/CLAUDE.md, stay as they are.permission: OpenCode’s owngrepandglobare denied, andgrep,rg,findandgit grepthrough bash, so that a question goes toototo_askand exact text toototo_search. A single rule you had forbash("bash": "ask") is kept as the rule for every other command.
ototo init --keep-search leaves OpenCode’s own search on: no permission entries. The rest is the same.
A config with comments (opencode.jsonc) is not rewritten: ototo init prints what to add, for you to put in
by hand.
With no small model
ototo init on a machine with no model server sets up the tools that need none: ototo_search, ototo_read,
ototo_outline, ototo_changes, ototo_history and ototo_replace_all, and the instructions speak of those
alone. Run ototo init again once a server runs (quick starts).
Check
opencode mcp list
should show ototo connected. ototo doctor checks the registration, the instructions and the permissions, with
the model server and the plugins.
Taking it out
ototo opencode remove
takes Otōto’s three entries out of opencode.json, backing it up first, and deletes opencode.md. sh uninstall.sh, from the package, runs it with the rest. A config with comments is left alone, and it says so.