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-colbymchemry-codegraph

v0.2.2

Published

OpenCode server + TUI plugin for colbymchenry CodeGraph auto-init, sync, and status visibility

Readme

opencode-colbymchemry-codegraph

OpenCode server + TUI plugin for colbymchenry/codegraph.

Features

| Layer | Behavior | |---|---| | Server plugin | Injects CodeGraph MCP config, initializes missing repo index, syncs after edit-like tools | | TUI plugin | Shows CodeGraph state in sidebar: ready, initializing, syncing, missing binary, error | | Native tools | codegraph-plugin-status, codegraph-plugin-init, codegraph-plugin-sync |

Install

Add server plugin to opencode.json:

{
  "plugin": ["opencode-colbymchemry-codegraph"]
}

Add TUI plugin to tui.json:

{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": ["opencode-colbymchemry-codegraph"]
}

No npm install step required. opencode resolves plugin packages from config.

The plugin depends on @colbymchenry/codegraph and prefers its bundled binary. Set codegraphCommand only to use a custom binary.

Restart opencode after config changes.

Options

Tuple form:

{
  "plugin": [
    [
      "opencode-colbymchemry-codegraph",
      {
        "autoInit": "always",
        "autoSync": true,
        "injectMcp": true,
        "slimMcp": false,
        "codegraphCommand": "codegraph",
        "syncDebounceMs": 4000
      }
    ]
  ]
}

| Option | Default | Description | |---|---:|---| | autoInit | "always" | "always", "ask", "never"; true maps to "always", false maps to "never" | | autoSync | true | Debounced codegraph sync after edit/write/patch and common mutating shell commands | | injectMcp | true | Adds mcp.codegraph with codegraph serve --mcp; skipped for complete raw slim config | | slimMcp | false | Adds slim: true to injected MCP config for cfg-aware opencode-slim-mcp; requires plugin order below | | codegraphCommand | bundled binary, then "codegraph" | Custom binary name or absolute path | | syncDebounceMs | 4000 | Delay before post-edit sync |

MCP Config

By default, the server plugin injects this config when mcp.codegraph is missing or null:

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

If opencode.json already defines mcp.codegraph, the plugin shallow-merges it over the defaults. User values override defaults; plugin-only extension keys such as slim are stripped before opencode validates MCP config:

{
  "plugin": ["opencode-colbymchemry-codegraph"],
  "mcp": {
    "codegraph": {
      "command": ["/path/to/codegraph", "serve", "--mcp"],
      "env": {
        "CODEGRAPH_LOG": "debug"
      }
    }
  }
}

Effective config keeps default type and enabled, replaces command, and adds env.

Set injectMcp: false to disable automatic MCP injection.

Slim MCP

Current opencode-slim-mcp discovers slim servers from raw opencode.json, before this plugin injects defaults. Use a complete raw MCP entry:

{
  "plugin": [
    "opencode-slim-mcp",
    "opencode-colbymchemry-codegraph"
  ],
  "mcp": {
    "codegraph": {
      "slim": true,
      "type": "local",
      "command": ["codegraph", "serve", "--mcp"],
      "enabled": true
    }
  }
}

When complete raw slim config is present, this plugin does not re-inject mcp.codegraph after the slim plugin removes it. {"slim": true} without command or url falls back to normal MCP injection.

For a cfg-aware opencode-slim-mcp that scans cfg.mcp inside its config hook, use plugin order so CodeGraph injects first:

{
  "plugin": [
    [
      "opencode-colbymchemry-codegraph",
      { "slimMcp": true }
    ],
    "opencode-slim-mcp"
  ]
}

Do not enable slimMcp with current raw-config-only opencode-slim-mcp; opencode may reject the final slim key.

Status File

Server plugin writes one file per project path under:

~/.local/state/opencode/colbymchenry-codegraph/projects/<sha256(project-path)>.json

TUI plugin derives same path from current workspace directory and reads it via OpenCode file API, so local projects, separate repos, and separate worktrees stay isolated.

Development

npm install
bun run build

Local server plugin output is copied to .opencode/plugins/codegraph.js after build.