opencode-api
Installation
SKILL.md
opencode server API (v2)
Overview
opencode v2 moved every server route under /api/ (POST /api/session,
GET /api/event, GET /api/info), so the v1 routes you remember (/session,
/event, /global/health, /doc) are probably wrong. Do not write opencode
API calls from memory. Look each one up in the cached OpenAPI spec,
opencode OpenAPI spec (about 1 MB, 170+ operations): search it with the script
instead of reading it. The first run downloads the spec into a per-user
cache ($XDG_CACHE_HOME/opencode-dev-plugin/opencode-api/, default
~/.cache/...) and re-checks it weekly; offline, it uses the cached copy.
No network at all? Download https://opencode.ai/docs/openapi.json yourself
and add --spec <file> to each command.