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

@codegraphy-dev/core

v1.3.0

Published

CodeGraphy core indexing and graph query engine

Readme

@codegraphy-dev/core

Shared CodeGraphy engine package for workspace indexing, Graph Cache access, plugin management, Graph Query behavior, and the terminal codegraphy command.

This package is the headless core used by the VS Code extension, MCP server, and CLI.

The VS Code extension bundles this package for extension runtime behavior. Users install @codegraphy-dev/core globally only when they want terminal workflows such as setup, Indexing, status, plugin registration, or workspace plugin enablement.

All codegraphy ... terminal subcommands live in this package. The core CLI does not own MCP client configuration or MCP server startup. codegraphy setup prepares CodeGraphy's own user state, while @codegraphy-dev/mcp owns the optional agent-agnostic codegraphy-mcp server command.

Current Entry Points

  • CodeGraphy Workspace paths: resolve .codegraphy/settings.json and .codegraphy/graph.lbug for any folder path.
  • Workspace Settings: read, normalize, write, and fingerprint workspace-local settings, including ordered plugin entries.
  • File Discovery: discover analyzable files and directories in any CodeGraphy Workspace without VS Code APIs.
  • Tree-sitter Analysis: parse supported languages and produce file, symbol, import, call, inherit, reference, and type-import relationships.
  • File Analysis: run cache-aware per-file plugin analysis and project file relationships without VS Code APIs.
  • Core Indexing: index an explicit CodeGraphy Workspace path, run headless plugins, build the Relationship Graph, and write the workspace Graph Cache.
  • Workspace Analysis: orchestrate discovery, pre-analysis hooks, file analysis, cache updates, and graph rebuilds through headless dependencies.
  • Graph Projection: build file, package, folder, and symbol Relationship Graph nodes and edges from analysis results.
  • Plugin manifests: read package.json#codegraphy metadata without importing plugin runtime code.
  • Plugin Registry: register, read, and write the user-level ~/.codegraphy/plugins.json registry.
  • Workspace plugin enablement: enable or disable registered plugin packages by writing the workspace-local plugins array.
  • Graph Cache status: report whether a workspace-local Graph Cache exists without using VS Code APIs.
  • Workspace status: report fresh, stale, or missing Graph Cache state with inspectable stale reasons.
  • Graph Cache storage: load, save, clear, and inspect the LadybugDB-backed Graph Cache at <workspace-root>/.codegraphy/graph.lbug.
  • Graph Query: run node, edge, relationship, symbol, and path reports over Relationship Graph data plus persisted analysis metadata.

The core package now exposes indexCodeGraphyWorkspace for explicit path-based Indexing. VS Code, MCP, and CLI adapters should call this package instead of owning independent indexing behavior.

Plugin State Model

Plugin installation, global registration, and workspace enablement are separate:

  • Installing the VS Code extension is enough for the base graph experience.
  • Terminal plugin management starts with npm install -g @codegraphy-dev/core.
  • Registered plugins live in the user-level Plugin Registry at ~/.codegraphy/plugins.json.
  • Enabled plugins live in a CodeGraphy Workspace settings file at <workspace-root>/.codegraphy/settings.json.
  • New workspaces materialize @codegraphy-dev/plugin-markdown as the first enabled plugin during first Indexing.
  • The enabled plugin order is the order of the workspace plugins array.
  • plugins register <package> records one globally installed package in the user-level Plugin Registry after validating its CodeGraphy plugin metadata.
  • plugins enable <package> [workspace] and plugins disable <package> [workspace] take the workspace as an optional trailing positional argument. With no workspace path, they target the process current working directory and do not walk upward to find a parent repo or existing .codegraphy folder.
  • plugins link <package-root> records a local package checkout in the user-level Plugin Registry, which is the preferred private-plugin development path.
  • Enabling or disabling a plugin changes workspace settings only; plugin runtime loading still waits for explicit Indexing so users can batch several plugin changes before rebuilding the Graph Cache.
  • Indexing imports enabled npm plugin packages through their normal package exports, merges manifest defaultOptions with workspace-local options, delivers the result to package factories as factoryOptions.options, and delivers the same result to plugin lifecycle and analysis hooks as context.options.
  • Package factories loaded for a concrete CodeGraphy Workspace also receive factoryOptions.dataHost, a plugin-owned persistence host bound to the plugin id returned by the factory.

Plugin npm packages identify themselves with package metadata:

{
  "name": "@codegraphy-dev/plugin-python",
  "version": "1.2.3",
  "codegraphy": {
    "type": "plugin",
    "apiVersion": "^2.0.0",
    "defaultOptions": {
      "includeTests": true
    },
    "disclosures": []
  }
}