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

pi-memorix

v0.1.9

Published

Pi extension that bridges Memorix memory hooks into Pi's session lifecycle

Readme

pi-memorix

Pi extension that bridges Memorix memory hooks into Pi's session lifecycle.

Wires Memorix into Pi's session lifecycle for automatic memory capture and recall. File writes, commands, and session summaries are captured as observations automatically. With the MCP server configured, the LLM also loads previous session context and searches memories at the start of each conversation.

What it does

| Pi event | Memorix hook | Behavior | |---|---|---| | session_start | SessionStart | Loads previous session context, injects it on the first turn | | before_agent_start | UserPromptSubmit | Fetches memories relevant to the current prompt | | tool_result | PostToolUse | Auto-captures write/edit/bash results as Memorix observations | | session_before_compact | PreCompact | Saves context before /compact wipes the thread | | session_shutdown | Stop | Stores a session summary when Pi exits |

Also adds a /mem <query> command for quick memory search from within Pi.

Installation

1. Install Memorix:

npm install -g memorix

2. Install this extension:

pi install npm:pi-memorix

To try it without making it permanent: pi -e npm:pi-memorix

3. Wire the MCP server — required for memory recall (context injection at session start):

Add this entry to ~/.pi/agent/mcp.json under mcpServers:

"memorix": {
  "command": "memorix",
  "args": ["serve"],
  "directTools": true
}

Without this, auto-capture still works (PostToolUse, Stop) but the LLM has no tools to recall past memories. Skip this only if you want silent capture with no recall.

4. (Optional) Enable auto-install of the git hook so commit-time capture is set up automatically for every repo you open:

Create ~/.pi/agent/memorix.json:

{ "autoGitHook": true }

With this enabled, the extension installs the hook the first time you open a repo that doesn't have it yet. To install manually instead:

memorix git-hook   # run once per repo

Bootstrapping an existing repo

For repos with existing history, seed Memorix from past commits before the git hook takes over:

memorix ingest log             # last 10 commits
memorix ingest log --count 50  # go further back

Run once per repo. The git hook handles new commits from that point on.

Usage

Once installed, the extension runs automatically with every Pi session. Steps 3 and 4 are optional — the extension's lifecycle hooks work without them. The MCP server (step 3) adds the ability for the LLM to call memorix_search and memorix_store directly on top of the automatic capture.

The /mem command lets you search project memory without leaving Pi:

/mem how does auth work
/mem recent session context
/mem what changed in the API layer

Debug mode

MEMORIX_PI_DEBUG=1 pi

Logs all hook activity to stderr. To verify hooks are firing:

[memorix-pi] SessionStart: loaded 1234 chars
[memorix-pi] PostToolUse — memorix stored observation
[memorix-pi] Auto-installed git hook in /your/repo
[memorix-pi] Stop: session saved to memorix

To see what was stored after a session:

cd your-repo && memorix recent

Maintenance

# Health check — project identity, data, conflicts
memorix doctor

# Preview and remove low-quality auto-captured noise
memorix cleanup --dry
memorix cleanup --force

# Inspect what's expiring; archive old memories
memorix retention

# Project info and rules sync status
memorix status

Notes

  • Memorix requires a .git directory in the project root to identify the project. Outside git repos, hooks are silently skipped.
  • All Memorix failures are silent by default — Pi never crashes because of this extension.
  • If memorix is not found on PATH, the extension disables itself after the first failed spawn.