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

@mayurdluffy/cbm-cli

v1.0.8

Published

The ultimate manager for codebase-memory-mcp — install, build, share, and query codebase graphs with one command

Readme

GitHub release License CI


Why CBM?

codebase-memory-mcp is a beast. It indexes your entire codebase into a queryable knowledge graph — functions, call chains, HTTP routes, cross-service links — and answers structural queries in under a millisecond after initial indexing. It cuts agent token usage by 10–100x depending on query type and supports 158 languages via tree-sitter, with deep semantic analysis for 12 major languages.

But getting it installed, keeping the binary updated, configuring a dozen different agents, and sharing the indexed graph with your team involves a lot of moving parts.

CBM handles all of that for you.

Think of CBM as the project-level manager that wraps the engine. One command to install the binary. One command to index your repo. One command for your teammates to jump in. No manual config file editing. No "works on my machine."


What CBM Does

  1. Installs & manages the codebase-memory-mcp binary for you.
  2. Indexes your project into a shareable graph.db.zst artifact.
  3. Auto-configures 11 coding agents with an interactive menu — no copy-pasting JSON.

Limitations

  • Best for structural queries — call chains, symbol discovery, blast radius analysis
  • Not for semantic questions — "is this algorithm correct?" still requires reading code
  • Tiny projects (<20 files) — grep may be faster than indexing
  • Stale graphs — re-index after large refactors with cbm re-index
  • Config/non-code files — .env, Dockerfiles not indexed
  • Answer quality — 83% vs 92% for raw file exploration (arxiv paper)

Installation

Via npm (Recommended)

npm install -g @mayurdluffy/cbm-cli

Via npx (No install)

npx @mayurdluffy/cbm-cli install

Via curl (macOS / Linux)

curl -fsSL https://raw.githubusercontent.com/mayurdluffy/cbm-cli/main/install.sh | bash

Windows

npm install -g @mayurdluffy/cbm-cli
# or
npx @mayurdluffy/cbm-cli install

Security

The codebase-memory-mcp binary is closed-source but each release is signed, checksummed, and scanned. All processing is local — your code never leaves your machine. See upstream SECURITY.md.


Uninstalling

Remove the codebase-memory-mcp binary only

cbm uninstall

This removes the binary, cache, and config — but keeps cbm installed.

Remove cbm entirely

npm:

npm uninstall -g @mayurdluffy/cbm-cli

curl (macOS / Linux):

npm uninstall -g @mayurdluffy/cbm-cli

The curl installer uses npm under the hood, so the uninstall command is the same.


Quick Start

# 1. Install the engine + select your agents
cbm install

# 2. Index your project and create a shareable graph
cd ~/projects/my-awesome-api
cbm build

# 3. Commit the graph so your team skips re-indexing
git add .codebase-memory/graph.db.zst
git commit -m "Add shareable codebase graph"
git push

# 4. Teammates clone and go
cbm use

CLI at a Glance

@lucifer:~$ cbm

   ██████╗ ██████╗ ███╗   ███╗
  ██╔════╝ ██╔══██╗████╗ ████║
  ██║      ██████╔╝██╔████╔██║
  ██║      ██╔══██╗██║╚██╔╝██║
  ╚██████╗ ██████╔╝██║ ╚═╝ ██║
   ╚═════╝ ╚═════╝ ╚═╝     ╚═╝

  Codebase Memory Manager
  - Supercharge your agentic coding — without the token bleed

  Usage: cbm [command]

  Setup:
    install (i)      Install codebase-memory-mcp + select agents
    update (up)      Update to latest version
    uninstall        Remove from system
    version (-V, -v)  Show version info
    kill (k)         Stop running server
    help (-h, --help)  Show help

  Project:
    build (b)        Index + create shareable graph + select agents
    use (u)          Use shared graph (no indexing needed)
    re-index (ri)    Force re-index + fresh artifact
    status (s)       Show project graph status

  Options:
    --version, -V, -v  Show version
    --help, -h         Show help
    --yes, -y          Skip prompts
    --agents, -a       Specify agents (comma-separated)

  Raw CLI:
    cbm <cmd>    Any codebase-memory-mcp CLI command
    Example: cbm cli search_graph '{"name_pattern": ".*"}'

  Supported Agents:
    Claude Code, Codex CLI, Gemini CLI, Zed, OpenCode,
    Antigravity, Aider, KiloCode, VS Code, OpenClaw, Kiro

  Notes:
    • Aider: No native MCP config — use ./cbm-aider wrapper
    • Antigravity: Shares Gemini CLI config file

  Workflow:
    cbm install → select agents → cbm build → select agents → git push

Commands

Setup

| Command | Alias | Description | |---|---|---| | cbm install | i | Install codebase-memory-mcp + select agents | | cbm update | up | Update to latest version | | cbm uninstall | | Remove from system | | cbm version | -V, -v | Show version info | | cbm kill | k | Stop running server | | cbm help | -h, --help | Show help |

Project

| Command | Alias | Description | |---|---|---| | cbm build | b | Index + create shareable graph.db.zst + select agents | | cbm use | u | Use shared graph (no indexing needed) | | cbm re-index | ri | Force re-index + fresh artifact | | cbm status | s | Show project graph status |

Raw CLI

Any command not recognized by cbm is passed to codebase-memory-mcp:

cbm cli search_graph '{"name_pattern": ".*Handler"}'
cbm cli get_architecture '{}'
cbm config get auto_index
cbm --version

Non-Interactive / CI Mode

Use --yes to skip prompts and select all agents, or --agents to specify a comma-separated list:

# Install and configure all agents without prompting
cbm install --yes

# Build and configure only Claude Code (1) and OpenCode (5)
cbm build --agents 1,5

# Use shared graph and configure only VS Code (9)
cbm use --agents 9

Agent numbers:

  1. Claude Code
  2. Codex CLI
  3. Gemini CLI
  4. Zed
  5. OpenCode
  6. Antigravity
  7. Aider
  8. KiloCode
  9. VS Code
  10. OpenClaw
  11. Kiro

Interactive Agent Selection

CBM features an interactive arrow-key menu for selecting coding agents:

Configure which agents for this project?

↑↓ navigate · space toggle · a all · n none · enter confirm

❯ ○ Claude Code
  ○ Codex CLI
  ● Zed          ← toggled
  ○ OpenCode
  ● VS Code      ← toggled
  ...

Workflows

Owner Workflow

cd ~/projects/my-api
cbm build        # Index + create artifact
git add .codebase-memory/graph.db.zst
git commit -m "Add codebase graph"
git push

Teammate Workflow

git clone <repo>
cd <repo>
cbm use          # No indexing needed!
# Restart agent and code

Refactor Workflow

cd ~/projects/my-api
cbm re-index     # Fresh graph after big changes
git add .codebase-memory/graph.db.zst
git commit -m "Update graph after refactor"
git push

What Gets Created

my-awesome-api/
├── .codebase-memory/
│   ├── cbm-server.sh      ← MCP wrapper (committed)
│   └── graph.db.zst       ← Shareable graph (committed)
├── .opencode/              ← if OpenCode selected
│   └── opencode.json      ← OpenCode config (committed)
├── .claude/                ← if Claude Code selected
│   └── .mcp.json          ← Claude Code config (committed)
├── .vscode/                ← if VS Code selected
│   └── mcp.json           ← VS Code config (committed)
├── CONVENTIONS.md         ← Aider conventions (if Aider selected)
├── cbm-aider              ← Aider wrapper (if Aider selected)
├── .gitignore             ← Ignores live DB
└── .gitattributes         ← Prevents merge conflicts

Cross-Platform

| OS | Status | |---|---| | macOS | ✅ Fully supported | | Linux | ✅ Fully supported | | Windows | ✅ Supported (npm, PowerShell, Git Bash, WSL) | | CI/CD | ✅ Non-interactive fallback with --yes / --agents |


Pro Tips

1. The Graph Travels With the Code

Commit graph.db.zst and CI can use it:

# .github/workflows/ci.yml
- name: Use codebase graph
  run: |
    npm install -g @mayurdluffy/cbm-cli
    cbm use --yes
    # run structural tests

2. Keep It Updated

After large refactors, run cbm re-index and commit the new graph.db.zst so teammates stay in sync.

3. Aider Users

Aider has no native MCP config file. Use the generated ./cbm-aider wrapper to launch Aider with codebase-memory-mcp attached.


Troubleshooting

| Issue | Fix | |---|---| | command not found: cbm | npm install -g @mayurdluffy/cbm-cli or use npx @mayurdluffy/cbm-cli | | codebase-memory-mcp not found | cbm install | | Agent doesn't see tools | Restart agent; check cbm status | | graph.db.zst missing | Run cbm build | | Server won't start | cbm kill then restart agent | | Stale graph | cbm re-index and commit | | Interactive menu hangs in CI | Use cbm <cmd> --yes or --agents N,M |


Contributing

This is a community project. Contributions, issues, and feedback are welcome!

License

MIT — see LICENSE.