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

dev-memory

v1.0.2

Published

Persistent memory layer for Claude Code sessions

Downloads

281

Readme

DevMemory

npm version license website

Give AI coding agents long-term memory.

Debug a bug once. Never debug it again.

DevMemory lets tools like Claude Code remember:

  • bugs you fixed
  • architecture decisions
  • project patterns
  • past debugging sessions

Your AI assistant learns your project over time.

Memory is stored as plain Markdown inside your repo — readable, diffable, committable.


The Problem

AI coding assistants forget everything.

Every new session starts from zero.

That means:

  • You fix the same bugs again
  • You re-explain your architecture
  • You repeat the same context
  • Your AI pair programmer has no long-term memory

The Solution

DevMemory adds a persistent memory layer for AI coding sessions.

It automatically:

  1. Loads relevant project knowledge before each session
  2. Records what happens during the session
  3. Extracts useful knowledge
  4. Saves it for future sessions

Your AI assistant slowly builds experience with your codebase.


How It Works

Before session                 After session
─────────────────              ─────────────────
Load project memory    →       Parse Claude transcript
TF-IDF search by goal  →       Summarize session
Inject into Claude context  →  Extract knowledge
                               Append to memory
                               Rebuild search index

Memory lives in .ai/memory/*.md — human readable, git friendly, easy to edit manually.


Demo

Session 1

You debug a Redis timeout.

Claude finds the fix:

increase Redis timeout to 10s
due to network jitter in staging

DevMemory automatically saves it to .ai/memory/bugs.md.

Session 2

You hit the same issue again.

Claude already knows the solution:

"This issue happened before. Increase Redis timeout to 10s."

Your AI assistant learned from the past session.


Installation

Requirements

  • Node.js ≥ 18
  • Claude Code CLI installed
  • ANTHROPIC_API_KEY set

Install

npm install -g dev-memory

Quick Start

Inside any project directory:

dev-memory --goal "debug auth middleware"

Example output:

[dev-memory] Loaded 13 memory entries (2 relevant)
[dev-memory] Starting Claude Code session...

...

[dev-memory] Session ended
[dev-memory] Extracted 3 new learnings

Auto Mode (Recommended)

DevMemory can run automatically using Claude Code hooks.

Add this to .claude/settings.json:

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "dev-memory inject 2>/dev/null || true"
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "nohup dev-memory compile > /dev/null 2>&1 &"
          }
        ]
      }
    ]
  }
}

Now DevMemory will:

  • inject memory before each prompt
  • compile new knowledge after each session

Fully automatic.


What DevMemory Remembers

Memory is organized by type:

.ai/memory/
├── architecture.md
├── decisions.md
├── bugs.md
└── learnings.md

Example entry:

### Bug: Redis timeout in staging

Cause: network jitter
Fix: increase redis timeout to 10s

Your project slowly builds a living knowledge base.


CLI Usage

# Start a session
dev-memory

# With a goal
dev-memory --goal "implement auth middleware"

# Pass arguments to Claude
dev-memory -- --resume
dev-memory -- --model claude-opus

CLI Flags

| Flag | Description | |---|---| | --goal | Describe what you're working on | | --project-dir | Project root | | --no-memory | Start session without loading memory | | --no-compile | Skip memory compilation | | --verbose | Detailed logs |


Project Structure

your-project/
├── CLAUDE.md
└── .ai/
    ├── config.json
    ├── memory/
    │   ├── architecture.md
    │   ├── decisions.md
    │   ├── bugs.md
    │   ├── learnings.md
    │   └── context.md
    ├── history/
    │   └── session.json
    └── embeddings/
        └── store.db

Add to .gitignore:

.ai/history/
.ai/embeddings/
.ai/memory/context.md

Commit .ai/memory/*.md — these files become your project knowledge base.


Architecture

DevMemory runs a two-phase pipeline.

Phase 1 — Summarize Session transcript → Claude → summary.

Phase 2 — Extract Claude extracts structured knowledge:

  • bugs
  • decisions
  • architecture
  • learnings

Stored locally and indexed using SQLite + TF-IDF. Fast, local, cheap.


Memory Graph (Experimental)

Visualize your project's knowledge graph.

dev-memory graph

Example output:

Auth System
├── decision: use JWT
├── bug: token expiry race condition
└── learning: refresh token rotation

Payment System
├── decision: Stripe webhooks
├── bug: duplicate charge bug
└── learning: idempotency keys

Coming soon:

dev-memory graph --visual
dev-memory graph --web

Interactive knowledge graph for your codebase.


Philosophy

AI tools should learn like developers do — from experience.

DevMemory turns coding sessions into a growing project memory.

Over time your AI assistant becomes faster, smarter, and more aware of your architecture.


Roadmap

Planned features:

  • Memory Graph
  • Architecture Map generation
  • Multi-agent memory
  • Cursor integration
  • GitHub Copilot integration

Contributing

PRs welcome. If you have ideas for improving AI memory systems, open an issue.


License

MIT