For the complete documentation index, see llms.txt. A markdown version of this page is at /reference/tools/devtools/opencode/index.md.

opencode

The OpenCode CLI, installed globally with npm.

Installs the OpenCode CLI (opencode) as the global npm package @opencode/cli.

devtools:
  - name: nodejs
  - name: opencode

That is the whole install. Ringleader turns off OpenCode’s automations and update offer, as OpenCode defaults describes. To set a model or other settings, add an opencode toolconfig. To sign in, see Sign in to a coding agent.

Version behavior

versionResult
omittedthe release Ringleader installs by default, 2.4.0 today
2.4.0that exact npm version

A workstation where opencode runs keeps the release it has. A changed version replaces that release on the next configuration pass. If opencode is on the PATH but fails to run, Ringleader installs it again.

OpenCode 1.x

OpenCode 1.x came from another npm package, opencode-ai. Ringleader does not replace it, so a workstation that still has OpenCode 1.x keeps it, and OpenCode fails to install if you set version. To move to a release in the table, remove the old package on the workstation:

sudo npm uninstall -g opencode-ai

The next configuration pass then installs OpenCode from @opencode/cli.

Updates

With updatePolicy: latest and no version, OpenCode moves to the release Ringleader installs by default when an update to Ringleader raises it, by the Ringleader default route. It installs from npm, beside the old release, so an OpenCode session that is already running keeps its release.

Node.js

The recipe needs npm. Node.js for coding agents says which Node.js OpenCode runs on and what Ringleader installs when you declare none.

Example

Node 24, OpenCode, and a default model:

devtools:
  - name: nodejs
    version: "24"
  - name: opencode
toolconfigs:
  - name: opencode
    config:
      settings:
        model: anthropic/claude-sonnet-4-5

Notes

  • Ringleader’s two OpenCode defaults are in the OpenCode defaults. Apart from them, only what you declare in the toolconfig is written.
  • The binary lands on the system PATH.
  • Works on Debian, Ubuntu, and Alpine.