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

memoryrouter-claude

v1.0.1

Published

Persistent memory for Claude Code. One command installs hooks that inject relevant memories every turn, capture every conversation, and flush context before compaction — powered by MemoryRouter.

Readme

memoryrouter-claude

Persistent memory for Claude Code. One command installs hooks that give Claude Code a real long-term memory: relevant context injected into every turn, every conversation captured, and nothing lost to compaction — powered by MemoryRouter.

npx memoryrouter-claude init

That's it. Paste your Memory Key (free at app.memoryrouter.ai), pick a scope, and your Claude Code sessions remember everything — across sessions, across machines, across every AI platform connected to your vault.

Why

Claude Code's built-in auto memory is local notes per project on one machine. MemoryRouter is a different layer:

  • Semantic search over your full conversation history, not curated notes
  • Cross-machine — same memory on your laptop and your server
  • Cross-platform — the same vault works in ChatGPT, Claude.ai, OpenClaw, and your own apps
  • Compaction-proof — the full transcript is saved before Claude Code compacts it away

How it works

The installer adds five hooks to your Claude Code settings:

┌────────────────────────────────────────────────────────────────┐
│                       Claude Code session                      │
│                                                                │
│  SessionStart ──────► POST /v1/memory/warmup                   │
│                       (pre-load your vault → fast first recall)│
│                                                                │
│  UserPromptSubmit ──► POST /v1/memory/prepare                  │
│   (every prompt)      relevant memories injected as context    │
│                                                                │
│  Stop ──────────────► POST /v1/memory/ingest                   │
│   (every turn)        user prompt + assistant reply captured   │
│                                                                │
│  PreCompact ────────► POST /v1/memory/ingest                   │
│   (before compaction) full un-saved transcript flushed         │
│                                                                │
│  SessionEnd ────────► POST /v1/memory/ingest                   │
│   (session close)     final flush                              │
└────────────────────────────────────────────────────────────────┘
                  api.memoryrouter.ai  ·  Bearer mk_xxx

Every hook fails open: if the network or API is down, the hook exits 0 instantly and Claude Code continues as if nothing happened. Your prompts are never blocked, ever.

Commands

| Command | What it does | |---|---| | npx memoryrouter-claude init | Validate key, install hooks (interactive) | | npx memoryrouter-claude init --key mk_xxx --user --yes | Non-interactive install for all projects | | npx memoryrouter-claude status | Key validity + vault stats | | npx memoryrouter-claude off | Remove our hooks (only ours — your other hooks untouched) | | npx memoryrouter-claude hook <kind> | Internal — invoked by Claude Code |

Scopes

  • --project (default): writes to ./.claude/settings.json — this project only, committable
  • --user: writes to ~/.claude/settings.json — every project on this machine

The installer merges with your existing settings. It never overwrites other hooks or settings, it's idempotent (run it twice, get one set of hooks), and off removes exactly what it added.

Configuration

| What | Where | |---|---| | Memory Key | ~/.memoryrouter/config.json (created with 0600 permissions) | | Per-session state | ~/.memoryrouter/state/<session_id>.json | | Env override | MEMORYROUTER_API_KEY (takes priority over the config file) | | Debug logging | MEMORYROUTER_DEBUG=1 (hooks log to stderr) | | API base override | MEMORYROUTER_API_BASE (testing) |

Optional knobs in ~/.memoryrouter/config.json:

{
  "apiKey": "mk_...",
  "contextLimit": 2000,
  "density": "balanced"
}

Security notes

  • Your Memory Key is stored only in ~/.memoryrouter/config.json with 0600 permissions — never inside .claude/settings.json, so committing project settings never leaks your key.
  • All API traffic is HTTPS to api.memoryrouter.ai with Authorization: Bearer auth.
  • Want read-only injection with no capture? Use a key with the :read suffix (mk_xxx:read) — the server skips storage automatically.
  • Nothing is ever sent anywhere except your MemoryRouter vault.

Uninstall

npx memoryrouter-claude off        # removes hooks from project + user settings
rm -rf ~/.memoryrouter      # removes your key + local state

Requirements

License

MIT © MemoryRouter