npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-plugin-manager

v0.1.3

Published

Managed plugin sources for opencode

Downloads

397

Readme

opencode-plugin-manager

A plugin manager for opencode. Manages plugins from npm, git repos, and local paths.

By default, plugins are only installed/updated when you explicitly run a tool — nothing downloads on startup. Enable autoinstall and/or autoprune to change this.

Features

  • npm, git, and local plugin sources
  • Version pinning and lock file
  • Automatic bundling and install scripts when configured
  • Hot reload on tool-triggered refreshes (with limitations)

Install

Add the plugin manager to your opencode config:

{
  "plugin": ["opencode-plugin-manager"]
}

For local development:

bun run bundle
cp dist/plugin-manager.js ~/.config/opencode/plugins/plugin-manager.js

OpenCode autoloads .js files from ~/.config/opencode/plugins/.

Configuration

Create plugins.json (or plugins.jsonc) in ~/.config/opencode/:

{
  "$schema": "https://raw.githubusercontent.com/optix2000/opencode-plugin-manager/main/plugins.schema.json",
  "cacheDir": "~/.cache/opencode/opm",
  "plugins": [
    "[email protected]",
    "./plugins/my-local-plugin",
    {
      "source": "git",
      "repo": "https://github.com/acme/opencode-git-plugin.git",
      "ref": "v1.0.0",
      "entry": "./dist/index.js"
    },
    {
      "source": "local",
      "path": "../my-local-plugin",
      "entry": "./dist/index.js",
      "build": {
        "command": "npm run build"
      }
    }
  ]
}

Plugin entries

Plugins can be a shorthand string or an object with more options.

String shorthands:

  • "[email protected]" — npm package with optional version constraint
  • "./path/to/plugin" — local path (relative to the config file's directory, absolute, or ~/)

Object keys:

| Key | Sources | Required | Description | |-----|---------|----------|-------------| | source | all | yes | "npm", "git", or "local" | | name | npm | yes | npm package name | | version | npm | no | semver range (default: "latest") | | repo | git | yes | git clone URL | | ref | git | no | branch, tag, or commit to checkout | | path | local | yes | path to plugin directory or file (relative paths resolve against the config file's directory) | | entry | all | no | entry file override, or an array of entrypoints to load multiple plugins from the same source (default: auto-detected opencode.plugin.ts) | | build.command | git, local | no | shell command to run after clone/checkout | | build.timeout | git, local | no | build timeout in ms (max 300000) |

Multiple entrypoints

If a single repository or package contains multiple plugins, use an array for entry:

{
  "source": "local",
  "path": "./my-monorepo",
  "entry": ["./packages/plugin-a/dist/index.js", "./packages/plugin-b/dist/index.js"],
  "build": { "command": "npm run build" }
}

Each entrypoint is treated as a separate plugin with its own ID, lock entry, and lifecycle. The build command (if any) runs once per entrypoint.

Top-level keys

| Key | Required | Description | |-----|----------|-------------| | cacheDir | no | Where to store cached plugins (default: ~/.cache/opencode/opm) | | autoinstall | no | Automatically install plugins on startup (default: false) | | autoprune | no | Automatically prune stale cache on startup (default: false) | | plugins | yes | Array of plugin entries |

Tools

Run these from within opencode:

| Tool | Description | |------|-------------| | opm_install | Install plugins from plugins.json, reusing locked versions | | opm_update | Update plugins to newest versions matching constraints | | opm_prune | Remove cached versions not referenced by current config | | opm_sync | Install + prune in one step | | opm_self_update | Check for a newer release of the plugin manager itself |

Install/update writes plugins.lock.json in the cache directory and shows per-plugin state transitions.

Limitations

  • Only reads global config (~/.config/opencode/plugins.json) — no per-project plugin configs.
  • If multiple plugins register the same tool or auth provider, last-write-wins.
  • Hook code reloads on tool-triggered refreshes, but opencode caches some state per instance.
  • Changes to tool registration or auth-provider behavior may require restarting opencode.
  • OpenCode doesn't support slash commands from plugins, so you need to register them yourself. Starter templates are included in commands/ — copy them into .opencode/commands/ to get /opm-install, /opm-update, etc.