Skip to content

Latest commit

 

History

History
66 lines (51 loc) · 2.44 KB

File metadata and controls

66 lines (51 loc) · 2.44 KB

OpenCode plugins

Small, independently installable OpenCode V2 plugins maintained in one Bun workspace.

Package Purpose
packages/reviewer Reviews permission requests with an LLM before prompting the user.
packages/subagent-model Lets a parent select the model and reasoning variant for a child session.
packages/commands Overrides and adds slash commands, starting with an in-place /clear.

Install

From npm, with OpenCode's plugin manager:

opencode plugin add @joonix/opencode-reviewer
opencode plugin add @joonix/opencode-subagent-model
opencode plugin add @joonix/opencode-commands
opencode plugin list

Append @<version> to pin a release; each package README covers configuration and behavior. Git specifications do not work here: OpenCode's installer ignores npm's ::path: subdirectory selector and installs the repository root, which is not a plugin package.

Update

opencode plugin check   # report package plugins that have a newer release
opencode plugin update  # update package plugins to their latest release

update only moves package entries that are not pinned. A pinned @<version> entry stays pinned, and a directory entry tracks the checkout instead of the registry, so local development is unaffected by it.

Local development

Requires Bun 1.2.22 or newer and OpenCode 2.0.4 or newer. Configure a package by its directory path, which shadows the published package. Use directory entries for every package you develop locally; mixing one with an npm entry runs two versions of this repository side by side.

{
  "plugins": [
    { "package": "/path/to/opencode-plugins/packages/reviewer", "options": {} },
    "/path/to/opencode-plugins/packages/subagent-model",
    "/path/to/opencode-plugins/packages/commands"
  ]
}
bun install --frozen-lockfile
make test
make test-load

make test-load needs an installed opencode2 executable and uses disposable configuration and data directories.

Maintainers release packages by creating package-specific Git tags. GitHub Actions tests and packs the tagged source, then publishes through npm Trusted Publishing with provenance and no stored npm token. See RELEASING.md for the one-time npm and GitHub setup and the release steps. The repository intentionally provides no local publish target; established packages are released only through the GitHub workflow.