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

@pixs/cbm-tools

v0.2.0

Published

Native pi tools (cbm_*) wrapping the codebase-memory-mcp binary's cli subcommand - graph search, code snippets, indexing, with worktree-aware project resolution.

Readme

pi-codebase-memory

Native pi tools wrapping the codebase-memory-mcp binary's cli subcommand. Replaces the MCP-server transport with first-class cbm_* pi tools - same engine and graph DB, only the transport changes.

Requirements

  • codebase-memory-mcp on PATH
  • git (for worktree-aware project resolution)

Install

pi install /path/to/codebase-memory      # local path
# or
pi install git:github.com/<user>/codebase-memory

Tools

Eager: cbm_list_projects, cbm_search_graph, cbm_search_code, cbm_get_code_snippet, cbm_index_repository, cbm_search_tools.

Lazy (activated via cbm_search_tools): cbm_query_graph, cbm_trace_path, cbm_detect_changes, cbm_manage_adr, cbm_ingest_traces, cbm_get_graph_schema.

Commands: /cbm:index-status, /cbm:index-repository.

Legacy generator compatibility

At session start, the extension deactivates the unprefixed tools produced by older codebase-memory-mcp Pi generators. Those generators used the obsolete { name, run } registration shape and emitted tools without input schemas, causing Claude requests to fail with errors such as:

tools.4.custom.input_schema: Field required

The supported cbm_* tools remain active. No aliases are registered.

Worktree awareness

Indexes are keyed by the canonical checkout's absolute path. Inside a linked Git worktree:

  • resolveProject() translates the worktree cwd to the canonical checkout path (dirname of git rev-parse --git-common-dir) before matching project roots.
  • Every tool retries once with the cwd-resolved project when the binary answers "project not found or not indexed", so agents in worktrees don't conclude they must re-index.

Layout

src/index.ts                   - extension entry (registers everything)
src/active-tools.ts            - lazy activation and legacy-tool quarantine
src/cli.ts                     - runCli() + resolveProject() (binary interface)
src/schemas.ts                 - TOOLS: tool defs + typed typebox schemas
src/commands.ts                - /cbm:index-status, /cbm:index-repository
src/tools/generic.ts           - passthrough cbm_* tools
src/tools/index-repository.ts  - bespoke renderer
src/tools/search-graph.ts      - bespoke found/not-found renderer
src/tools/get-code-snippet.ts  - bespoke retrieved/not-found renderer
src/tools/search-code.ts       - bespoke found/not-found renderer
src/tools/list-projects.ts     - bespoke count renderer
src/tools/search-tools.ts      - lazy-tool loader