Install for OpenCode
Install Weave for OpenCode 1.x
This page is for OpenCode 1.x (opencode --version prints 1.x). On OpenCode 2 (@opencode/cli, the opencode2 command), follow Install for OpenCode 2 instead: the two hosts load different plugin packages.
Install
Section titled “Install”Add the Weave adapter to the plugin list in your opencode.json or opencode.jsonc. Use the project’s file to enable Weave for one repository, or ~/.config/opencode/opencode.json to enable it everywhere:
{ "plugin": ["@weaveio/weave-adapter-opencode@0.2.0"]}Then restart OpenCode. That’s the whole installation.
- OpenCode downloads the plugin itself when it starts. You don’t need Bun,
npm install, or the Weave CLI. - You don’t need a
.weaveconfig either. Without one, Weave registers its builtin agents:loom,tapestry,shuttle,pattern,thread,spindle,weft, andwarp. - Pin an exact version, as above, so every restart loads the same adapter.
Verify
Section titled “Verify”opencode debug configThe agent map in the output lists loom, tapestry, shuttle, and the other Weave agents. In the OpenCode UI, Loom is available as a primary agent.
Agents without a provider/model preference use your OpenCode model. See Model Resolution.
Customize (optional)
Section titled “Customize (optional)”To add agents or categories, or to change a builtin’s prompt or models, create a .weave/config.weave in your project. The Weave CLI scaffolds and validates one. It runs on Bun:
bunx @weaveio/weave-cli@0.2.0 init --scope local --yes --harness opencodebunx @weaveio/weave-cli@0.2.0 validateWith --harness opencode, weave init also adds the pinned plugin entry to the project’s opencode.json (creating opencode.jsonc if there is none), so it can replace the manual step above. It replaces a legacy @opencode_weave/weave entry. Restart OpenCode after you change .weave/config.weave.
See the DSL Configuration guide for the syntax.
Release channels
Section titled “Release channels”The adapter is published on two npm channels:
- latest: Stable releases (recommended)
- next: Pre-releases for trying upcoming changes
To follow a channel instead of an exact version, use the channel tag:
{ "plugin": ["@weaveio/weave-adapter-opencode@next"]}Channel tags are mutable: OpenCode can pick up a newer version from the channel when it restarts.
Troubleshooting
Section titled “Troubleshooting”If the agents don’t appear, see Adapter not loading (OpenCode).