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-mem-cc

v0.1.0

Published

Automatic observer-based memory for pi — silently compresses every tool call into searchable structured observations, injects relevant past context at session start.

Downloads

139

Readme

pi-mem-cc

Automatic observer-based memory for pi coding agent.

Inspired by claude-mem for Claude Code, but built natively for pi's extension API. Silently watches every tool call, compresses it into a structured observation, stores it in SQLite, and re-injects relevant past context at session start.

What's different from pi-memory (jayzeng)?

| | pi-memory | pi-mem-cc | |---|---|---| | Memory capture | Manual — agent/user calls memory_write | Automatic — every tool call observed | | Storage | Plain markdown files | SQLite + FTS5 | | Search | Optional qmd (external dep) | Built-in hybrid (keyword + recency) | | Injection | Agent must call memory_read | Auto-injected at session start | | Use case | Personal knowledge book | Cross-session continuity |

Use both. They cover different needs.

Install

pi install npm:pi-mem-cc

Then /reload.

Tools registered

| Tool | Purpose | Token cost | |---|---|---| | mem_search | Get compact index of matching observations | ~50-100 tok/result | | mem_timeline | Get chronological context around an observation id | variable | | mem_get | Fetch full observation details by IDs | ~500-1000 tok/each |

3-layer progressive disclosuresearch first, timeline for context, get only for filtered IDs.

Storage

~/.pi/agent/memory/pi-mem-cc.db   # SQLite (observations, summaries, FTS5)

How it works

  1. session_start → register session in DB
  2. before_agent_start → query top-K relevant past observations (recency × project match), append markdown to system prompt
  3. tool_result → fire-and-forget compress into <observation> via observer LLM, write to DB
  4. agent_end → fire-and-forget compress turn into <summary> via observer LLM, write to DB

The observer LLM uses the same model as the active session — no extra API key needed.

Configuration

No configuration. Uses your active session model.

License

Apache-2.0