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

@superbased/opencode-plugin

v1.27.0

Published

SuperBased Observer for OpenCode — registers the local observer MCP server (token, cost and cache observability). Requires the `observer` binary already on your PATH (npm i -g @superbased/observer, or pipx install superbased-observer) — this package is wi

Readme

@superbased/opencode-plugin — OpenCode plugin

Local-first token, cost and cache observability for OpenCode. The plugin registers observer's MCP server through OpenCode's config hook, so you never edit opencode.json's mcp block by hand.

Requires the observer binary already on your PATH. This package is wiring only — it declares an MCP server that runs observer; it does not download or bundle it.

npm i -g @superbased/observer     # or: pipx install superbased-observer
observer start                    # run the local daemon

Install

Add the package to the plugin array of your opencode.json (~/.config/opencode/opencode.json for every project, or a project-local opencode.json):

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@superbased/opencode-plugin"]
}

OpenCode installs npm plugins with Bun at startup and caches them in ~/.cache/opencode/node_modules/ — there is no separate npm install step.

Not published yet. @superbased/opencode-plugin is not on npm; this directory is the package source. Publishing is an operator-gated step.

What it wires

The plugin's config hook adds one entry to OpenCode's MCP map:

{
  "mcp": {
    "observer": {
      "type": "local",
      "command": ["observer", "serve"],
      "enabled": true
    }
  }
}

That is byte-for-byte the entry observer init --opencode writes — it is generated from the same registrar (src/wiring.generated.ts), not re-typed. observer serve speaks stdio MCP and exposes observer's project, session, cost and cache queries as tools (reads of the local database; continue_session writes a handover file only when you pass write_file=true).

No lifecycle hooks are registered. OpenCode's tool.execute.before/after and event hooks could surface cost hints in-session, but observer's capture does not need them: the watcher already reads OpenCode's own session store, and observer opencode routes turns through the local proxy for exact token counts.

Double-wiring: handled, in the one case we can

The hook skips itself when the server is already configured:

if (config.mcp[OBSERVER_MCP_SERVER_NAME]) return;

So carrying both this plugin and observer init --opencode's write is safe — whichever entry is already in the merged config wins, and the server is declared exactly once. Note this is a same-key check inside OpenCode's own config object, not a probe of what observer wrote; if you registered the server under a DIFFERENT name, both load.

(The on-disk detect-and-skip that makes observer init stand down for the Claude Code plugin is internal/claudeplugin — claude-code-only. There is no OpenCode equivalent, and none was built this round; observer init --opencode still writes its entry. The config-hook guard above is what makes that harmless.)

Package layout

| Path | Owner | |---|---| | src/wiring.generated.ts | Generated by plugins/plugingen from the real MCP registrar. Never edit. | | README.md | Generated (this file). | | src/index.ts | Hand-written SDK glue: the config hook. | | package.json, tsconfig.json | Hand-written. The version is stamped by scripts/sync-npm-version.sh in lockstep with the observer release. |

Build (operator step, before a publish):

npm install && npm run build      # tsc → dist/

dist/ is not committed. @opencode-ai/plugin is a devDependency and a type-only import, so the built plugin has no runtime dependencies.

Links

  • Docs: https://superbased.app/
  • Source: https://github.com/superbasedapp/observer
  • License: Apache-2.0