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

memrig

v0.2.0

Published

SQLite memory brain for AI coding assistants — per-user + shared memory via MCP

Readme

memrig

npm version License: MIT

SQLite memory brain for AI coding assistants. Per-user + shared team memory, hybrid search, zero config.

What It Does

memrig gives AI coding assistants (Claude Code, Cursor, etc.) persistent memory that survives across sessions. Each team member gets their own private memory plus a shared team brain — all searchable via full-text + semantic search.

your-project/
├── .mcp.json              ← committed to git
├── .memory/
│   ├── shared.db          ← team knowledge (committed)
│   └── users/
│       ├── alice.db       ← Alice's memories (gitignored)
│       └── bob.db         ← Bob's memories (gitignored)

Install

npm install memrig

Quick Start

# In your project directory:
npx memrig init

# That's it. Restart Claude Code and memrig is connected.

memrig init does the following:

  1. Creates .memory/ directory with shared.db and users/{you}.db
  2. Adds .memory/users/ to .gitignore (personal memories stay private)
  3. Creates .mcp.json with the memrig server config

Manual Setup

If you prefer to configure manually, add this to your .mcp.json:

{
  "mcpServers": {
    "memrig": {
      "command": "npx",
      "args": ["-y", "memrig"],
      "env": {
        "MEMORY_DIR": ".memory",
        "MEMRIG_USER": "${USER}"
      }
    }
  }
}

MCP Tools

| Tool | What It Does | |------|-------------| | remember | Save a memory (personal by default, or shared) | | recall | Search memories — hybrid FTS5 + vector search | | forget | Delete a memory by ID | | share | Promote a personal memory to shared team memory | | import_memory | Copy a shared memory to your personal space | | list_memories | Browse memories with filters | | link | Create an explicit relation between two memories (related, supersedes, or contradicts) |

Live Graph

npx memrig graph

Opens http://127.0.0.1:4319 in your browser — a live, force-directed graph of your memories.

Flags:

| Flag | Description | |------|-------------| | --port <n> | Use a different port (default: 4319) | | --no-open | Start the server without opening a browser tab | | --user <name> | View a specific user's memory (defaults to MEMRIG_USER) |

Respects the MEMORY_DIR environment variable.

What you see:

  • Nodes — each memory; color-coded by type, size reflects importance, faded when Ebbinghaus strength is low
  • Edges — three kinds, each togglable in the top bar:
    • Explicit links (red = contradicts, arrow = supersedes, plain = related) — created by the link tool
    • Dotted lines — semantic similarity derived from sqlite-vec embeddings
    • Faint lines — shared tags
  • Search — highlights matching nodes
  • Click a node — opens a side panel with full content and a Forget button
  • Live updates — the graph refreshes via SSE as the assistant remembers, recalls, or links

Memory Types

  • decision — Architectural or product decisions
  • preference — Personal or team preferences
  • context — Background context about the project
  • bug — Known bugs and workarounds
  • pattern — Code patterns and conventions
  • architecture — System architecture notes

How Search Works

recall uses hybrid retrieval:

  1. FTS5 BM25 — keyword matching across content and tags
  2. sqlite-vec — semantic similarity (MiniLM-L6-v2 embeddings, runs locally)
  3. Reciprocal Rank Fusion — merges both ranked lists with score = Σ 1/(k + rank)
  4. Ebbinghaus decay — older, less-accessed memories rank lower (decay rate varies by type)
  5. Cross-DB merge — personal results weighted 1.1x higher than shared

Memories below 5% strength are auto-pruned during recall.

Configuration

Environment variables (set in .mcp.json):

| Variable | Default | Description | |----------|---------|-------------| | MEMORY_DIR | .memory | Path to memory directory | | MEMRIG_USER | $USER | Username for personal memory isolation |

For Teams

  1. One person runs npx memrig init and commits .mcp.json + .memory/shared.db
  2. Everyone else pulls and runs npx memrig init (idempotent — won't overwrite existing config)
  3. Shared memories sync via git. Personal memories stay local.
  4. Use the share tool to promote personal memories to the team, import_memory to pull shared memories into your personal space.

Development

git clone https://github.com/RiggdAI/memrig.git
cd memrig
npm install
npm test        # run tests (vitest)
npm run build   # compile with tsup

License

MIT