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-optmem

v1.0.0

Published

Permanent, append-only memory for pi agents

Readme

OptMem for pi

Permanent memory for pi agents. OptMem keeps an append-only log and a compact binary summary tree, so memory survives sessions, compaction, model changes, and vendor changes.

how OptMem works

Install

pi install npm:pi-optmem

Python 3.7 or newer is required. Restart pi after installation. On the first session, the extension creates ~/.optmem/memory. It then wakes automatically before the first model turn; there is no AGENTS.md block to paste.

Use a project-local installation with:

pi install -l npm:pi-optmem

To install the latest unreleased source directly from GitHub instead:

pi install git:github.com/pi-pod/pi-optmem

Update later with pi update --extensions.

What the extension does

  • Runs memo wake at every pi session start and injects the result into the first turn.
  • Registers the optmem tool for recording, compressing, searching, and navigating memory.
  • Adds concise system guidance so durable facts and completed work are noted, and requested compressions are completed immediately.
  • Initializes a missing memory store only after the extension is deliberately installed and started.

The agent-facing tool supports these actions:

| Action | Purpose | Fields | |---|---|---| | note | Save one durable, non-redundant memory | text | | nap | Ask for the next compression, or submit one | none, or block + text | | recall | Search every raw memory with a regex | query | | zoom | Open a summary block into its halves | block | | wake | Continue paged startup output | optional part + snapshot | | forget | Drop a bad summary so it can be rebuilt | block |

Storage and configuration

~/.optmem/
  memory/
    LOG.txt     every memory, append-only
    TREE/       rebuildable summary cache
    config      size settings

Set MEMORY_DIR before starting pi to use another location, such as a synced folder or Git repository.

The bundled memo program remains the storage engine. To inspect or tune a store outside pi, run it from this checkout:

./memo config
./memo config WAKE_LINES=300
./memo recall 'project name'

Never edit LOG.txt or TREE/ directly.

Standalone CLI integration

OptMem can still be installed for other agent harnesses with the original single-file installer:

curl -fsSL https://raw.githubusercontent.com/VictorTaelin/OptMem/main/install.sh | sh

That installer prints the instruction block used by non-pi agents. The pi extension does not need it.

Development

python3 test.py
pi -e .

The Python test suite checks tree coverage, persistence, paging, UTF-8, concurrency, and crash recovery. pi -e . loads this repository as a temporary package for interactive testing.