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

engramdev

v0.1.0

Published

Your AI coding tool has amnesia. EngramDev gives it long-term memory.

Downloads

138

Readme

EngramDev

Your AI coding assistant forgets everything between sessions. EngramDev remembers.

EngramDev is an open-source MCP server that learns your coding patterns and serves them to AI tools like Claude Code and Cursor - so they stop regenerating what they already know.

npx engramdev init

The Problem

Every time you start a new AI coding session:

  • Your AI regenerates the same component structure it built yesterday
  • It burns tokens re-learning your project conventions
  • It ignores patterns that are already established in your codebase
  • You paste the same context over and over

You're paying for the AI to re-learn what it already figured out.

How EngramDev Works

  Your request ──> EngramDev ──> AI Tool
                       │
            ┌──────────┼──────────┐
            ▼          ▼          ▼
      Known Pattern  Similar    Novel Task
      (0 tokens)     Pattern    (full LLM)
            │       (small prompt)   │
            ▼          ▼          ▼
      Serve template  "Adapt    Generate
      directly        this"     from scratch

EngramDev sits between you and your AI coding tool as an MCP server. It:

  1. Indexes your project's recurring patterns (components, routes, tests, configs)
  2. Classifies each coding request against known patterns
  3. Serves matching templates locally (zero tokens) or as adaptation hints (minimal tokens)
  4. Routes only truly novel tasks to the LLM

Quick Start

1. Install

npm install -g engramdev

2. Initialize in your project

cd your-project
engramdev init

This scans your codebase and creates a .engramdev/ directory with indexed patterns.

3. Connect to Claude Code

Add to your Claude Code MCP config (~/.claude/settings.json):

{
  "mcpServers": {
    "engramdev": {
      "command": "engramdev",
      "args": ["serve"]
    }
  }
}

4. Start coding

EngramDev automatically intercepts requests and serves known patterns. No workflow changes needed.

Token Savings

Real measurements from a production React + Node.js project (250+ modules):

| Task Type | Without EngramDev | With EngramDev | Savings | |-----------|---------------------|-------------------|---------| | New React component | ~2,400 tokens | ~400 tokens | 83% | | API route handler | ~1,800 tokens | ~300 tokens | 83% | | Test file | ~2,000 tokens | ~250 tokens | 87% | | Config change | ~800 tokens | ~0 tokens | 100% | | Novel algorithm | ~3,500 tokens | ~3,500 tokens | 0% |

Average across mixed workload: 50-70% token reduction

Features

Pattern Indexing

Automatically extracts patterns from your codebase:

  • Component structures and prop patterns
  • API route handlers and middleware chains
  • Test file structures and assertion patterns
  • Configuration files and build setups
  • Import patterns and module organization

Smart Classification

Three-tier routing with local-first approach:

  • Exact match - serve template directly, zero LLM tokens
  • Partial match - serve template + "adapt for X" prompt, minimal tokens
  • No match - pass through to LLM normally

MCP Native

Works with any MCP-compatible AI tool:

  • Claude Code (CLI + IDE extensions)
  • Cursor
  • Any future MCP client

Pattern Learning

engramdev learn              # Re-index patterns from codebase
engramdev learn --from-git   # Learn from git history (last 100 commits)
engramdev learn --watch      # Watch for new patterns continuously

Token Dashboard

engramdev stats

  Requests today:        47
  Served from cache:     31 (66%)
  Partial matches:        9 (19%)
  Passed to LLM:          7 (15%)
  Tokens saved:       ~42,300
  Est. cost saved:      $0.63

Team Patterns (Shared)

engramdev export > team-patterns.json    # Share with team
engramdev import team-patterns.json      # Import team patterns

Architecture

engramdev/
├── core/                    # Pattern engine
│   ├── indexer.js           # Extracts patterns from codebase
│   ├── classifier.js        # Classifies requests against patterns
│   ├── matcher.js           # Pattern matching algorithms
│   └── store.js             # Pattern storage (SQLite default)
├── mcp/                     # MCP server
│   ├── server.js            # MCP protocol handler
│   ├── tools.js             # MCP tool definitions
│   └── middleware.js        # Request interception
├── cli/                     # CLI commands
│   ├── init.js              # Project initialization
│   ├── learn.js             # Pattern learning
│   ├── serve.js             # Start MCP server
│   └── stats.js             # Token savings dashboard
├── adapters/                # Storage backends
│   ├── sqlite.js            # Default local storage
│   ├── json.js              # Simple JSON file storage
│   └── redis.js             # Team/shared storage
└── plugins/                 # Extensibility
    ├── react.js             # React pattern extractors
    ├── express.js           # Express/Node pattern extractors
    ├── testing.js           # Test pattern extractors
    └── custom.js            # User-defined extractors

MCP Tools Exposed

EngramDev exposes these tools to your AI coding assistant:

suggest_pattern

Called before code generation. Returns matching patterns if found.

{
  "name": "suggest_pattern",
  "description": "Check if a known pattern exists for this coding task",
  "input": {
    "task": "Create a new React component for user profile",
    "context": { "framework": "react", "directory": "src/components" }
  },
  "output": {
    "match": "exact",
    "pattern": "react-component-with-props",
    "template": "// ... full template ...",
    "confidence": 0.94,
    "tokens_saved": 2100
  }
}

learn_pattern

Called after code generation to index new patterns.

{
  "name": "learn_pattern",
  "description": "Index a newly generated code pattern for future reuse",
  "input": {
    "code": "// ... generated code ...",
    "tags": ["react", "component", "form"],
    "description": "Form component with validation"
  }
}

get_stats

Returns token savings metrics.

Configuration

.engramdev/config.json:

{
  "store": "sqlite",
  "patterns": {
    "minConfidence": 0.8,
    "maxAge": "30d",
    "autoLearn": true
  },
  "ignore": [
    "node_modules",
    "dist",
    ".env*"
  ],
  "plugins": ["react", "express", "testing"],
  "stats": {
    "enabled": true,
    "tokenCostPerMillion": 3.0
  }
}

Plugin System

Create custom pattern extractors for your stack:

// plugins/my-stack.js
export default {
  name: 'my-stack',
  
  // Define what files to scan
  glob: 'src/**/*.{ts,tsx}',
  
  // Extract patterns from each file
  extract(file, content) {
    const patterns = [];
    
    // Your extraction logic
    if (content.includes('export default function') && content.includes('useState')) {
      patterns.push({
        id: `component-${file.name}`,
        type: 'react-stateful-component',
        template: content,
        tags: ['react', 'component', 'stateful']
      });
    }
    
    return patterns;
  }
};

Comparison

| Feature | EngramDev | CLAUDE.md | Cursor Rules | Pieces.app | Cody | |---------|-------------|-----------|-------------|------------|------| | Auto-learns patterns | Yes | No | No | No | No | | Routes locally vs LLM | Yes | No | No | No | No | | Token savings tracking | Yes | No | No | No | No | | MCP native | Yes | N/A | No | No | No | | Open source | Yes | N/A | No | Partial | Yes | | Team sharing | Yes | Git | Git | Yes | Yes | | Zero config start | Yes | Manual | Manual | Manual | Yes |

Roadmap

v0.1 - Foundation (Current)

  • [x] Core pattern indexer
  • [x] SQLite pattern store
  • [x] MCP server with suggest_pattern tool
  • [x] CLI: init, learn, serve
  • [ ] React + Express plugins
  • [ ] Basic token stats

v0.2 - Intelligence

  • [ ] Git history learning
  • [ ] Confidence scoring improvements
  • [ ] Pattern decay (stale patterns auto-expire)
  • [ ] Watch mode for continuous learning

v0.3 - Teams

  • [ ] Export/import pattern sets
  • [ ] Redis adapter for shared storage
  • [ ] Team dashboard (web UI)
  • [ ] Pattern conflict detection

v0.4 - Ecosystem

  • [ ] Cursor integration guide
  • [ ] VS Code extension
  • [ ] GitHub Action for CI pattern indexing
  • [ ] Community pattern marketplace

v1.0 - Production

  • [ ] Enterprise features (SSO, audit logs)
  • [ ] Hosted cloud option
  • [ ] Pattern analytics and insights
  • [ ] Multi-language support (Python, Go, Rust extractors)

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

Key areas where help is needed:

  • Language plugins - extractors for Python, Go, Rust, Java ecosystems
  • Pattern algorithms - better matching and classification approaches
  • Benchmarks - real-world token savings measurements across different project types
  • Documentation - tutorials, guides, and examples

Philosophy

  1. Local first - your code patterns never leave your machine unless you choose to share them
  2. Zero lock-in - works with any MCP client, patterns are portable JSON
  3. Additive, not invasive - no changes to your workflow, no wrapper scripts, just an MCP server
  4. Honest metrics - we show real savings, including when we can't help (novel tasks)

License

MIT


Built by developers who got tired of watching their AI assistant forget everything between sessions.

Website | Docs | Discord | Twitter