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

@casualjim/pi-codebase-memory

v0.1.2

Published

Codebase-memory MCP wiring and guidance plugin for Pi

Readme

pi-codebase-memory

pi-codebase-memory is a standalone Pi package that wires codebase-memory MCP tools into Pi and reminds agents to use graph-first discovery before broad raw code search.

What it provides

  • codebase-memory-mcp bundled as a package dependency.
  • Pi extension at extensions/codebase-memory.
  • Automatic ~/.pi/agent/mcp.json setup when no codebase-memory server is present.
  • directTools: true MCP configuration so Pi exposes codebase_memory_* tools directly.
  • One-shot reminders when broad raw discovery tools (grep, find, ls, and equivalents) are used before codebase-memory discovery.
  • Public codebase-memory skill with graph query guidance.

Install

pi install npm:@casualjim/pi-codebase-memory

For local development from this monorepo:

pi install ./packages/pi-codebase-memory

Reload Pi if the current session does not yet expose the codebase_memory_* tools after install.

MCP configuration behaviour

On startup, the extension checks ~/.pi/agent/mcp.json.

If no codebase-memory server is configured, it adds:

{
  "mcpServers": {
    "codebase-memory": {
      "command": "<current node executable>",
      "args": ["<bundled codebase-memory-mcp binary>"],
      "directTools": true
    }
  }
}

If a codebase-memory server already exists, the extension leaves it alone. If the JSON is malformed or the bundled binary cannot be resolved, setup reports the error instead of overwriting user config.

Discovery guidance

Agents should use this ladder for code discovery:

  1. Index the current repository if needed with codebase_memory_index_repository.
  2. Start with codebase_memory_get_architecture.
  3. Search symbols or code with codebase_memory_search_graph or codebase_memory_search_code.
  4. Trace callers, callees, or data flow with codebase_memory_trace_path.
  5. Read exact symbol source with codebase_memory_get_code_snippet.
  6. Use exact file reads or shell inspection for configs, text files, non-code assets, graph-insufficient cases, and follow-up verification.

If codebase-memory tools are missing or stale, report degraded discovery and avoid claiming architecture-aware analysis.

Development

npm test --workspace @casualjim/pi-codebase-memory
npm run typecheck --workspace @casualjim/pi-codebase-memory
npm run check:pack --workspace @casualjim/pi-codebase-memory