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

@eldrex/codememory

v1.0.0

Published

The Persistent Intelligence Layer for Codebases - Local-first CLI & MCP server for AI agents

Readme

🧠 CodeMemory

The Persistent Intelligence Layer for Codebases
Local-first, privacy-obsessed CLI tool and Model Context Protocol (MCP) server for AI agents.

🌐 Official Website & Docs: https://codemem.vercel.app/


⚡ Key Highlights

  • 🔒 100% Local & Private: Zero telemetry, zero external network calls. All intelligence stored locally in SQLite WAL mode.
  • 🌐 Interactive Web Architecture Explorer: Local visual flowchart & memory dashboard with timeline scrubbing and real-time live updates.
  • Token Efficiency: Minimizes AI prompt token consumption by providing targeted context slices and caller graphs instead of raw file dumps.
  • 🔍 Multi-Language AST Analysis: Extracts functions, classes, interfaces, structs, and imports across TypeScript/JavaScript, Python, Rust, Go, SQL, and more.
  • 👀 Real-time Live Watcher: Detects code changes instantly with 100ms debouncing and .gitignore integration.
  • 🤖 Native MCP Server: Ready to connect with Antigravity, Claude Desktop, Cursor, Copilot, and custom AI agents.
  • 📊 Architecture Visualizer: Generates live Mermaid diagrams, Markdown documentation, and JSON maps.

🚀 Quick Start

1. Installation

# Clone the repository
git clone https://github.com/EldrexDelosReyesBula/CodeMemory.git
cd CodeMemory

# Install dependencies
npm install

# Build TypeScript
npm run build

2. Basic Commands

# Initialize CodeMemory in your repository
npm run dev -- init

# Scan the current codebase and index all symbols
npm run dev -- scan

# Search for any function, class, or symbol
npm run dev -- query authenticateUser

# Extract token-budgeted AI context
npm run dev -- context AuthService --budget 2000

# Start the live background file watcher
npm run dev -- watch

# Export Mermaid architecture diagram
npm run dev -- export --format mermaid

# Check repository health and statistics
npm run dev -- status

🤖 Connecting to AI Agents via MCP

CodeMemory provides a full Model Context Protocol (MCP) stdio server.

Available MCP Tools

| Tool | Description | | :--- | :--- | | codememory_search | Search code symbols, signatures, and functions | | codememory_get_context | Token-budgeted context with dependencies & callers | | codememory_get_dependencies | Upstream imports and downstream dependents | | codememory_get_history | Recent file modifications and Git commit logs | | codememory_get_architecture | Generate real-time Mermaid architecture diagrams | | codememory_get_metrics | Overall codebase stats and language breakdowns |

Antigravity & Claude Desktop Configuration

Add the following to your MCP configuration (mcp_config.json or claude_desktop_config.json):

{
  "mcpServers": {
    "codememory": {
      "command": "node",
      "args": ["c:/Users/Eldrex/Downloads/classhost/Needs/CodeMemory/dist/cli.js", "mcp"],
      "env": {}
    }
  }
}

🏗️ Architecture

CodeMemory/
├── src/
│   ├── types/          # Domain data types & contracts
│   ├── db/             # SQLite engine with WAL mode & indexes
│   ├── parser/         # Multi-language AST symbol & dependency extractor
│   ├── watcher/        # Real-time debounced file watcher with .gitignore
│   ├── git/            # Git commit and diff history monitor
│   ├── generator/      # Mermaid diagram & Markdown/JSON exporters
│   ├── context/        # Token-budgeted context assembly & symbol ranker
│   ├── mcp/            # Model Context Protocol stdio server
│   └── cli.ts          # CLI commands router
└── tests/              # Complete Vitest test suite

📜 License

MIT License - Copyright (c) 2026 Eldrex Delos Reyes Bula.