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

@ryan_nookpi/pi-extension-memory-layer

v0.5.1

Published

Long-term memory layer for pi — remember, recall, forget, and browse memories across sessions.

Readme

memory-layer

Long-term and session memory for Pi. Remember, recall, forget, and browse memories across sessions.

What it does

  • Scopes
    • agent: private to the current Pi session. It is restored when that session is reopened, but is not inherited by a fork.
    • user: persistent personal preferences and cross-project rules.
    • project: persistent repository-specific decisions, tooling, and configuration.
  • Tiers: profile, log, and note. Recall and prompt injection prioritize them in that order, with query relevance deciding order within a tier. New and legacy memories default to profile. Tiers do not expire or delete memories automatically.
  • Prompt injection: each turn receives a bounded, tier-ordered index of accessible memory titles rather than full memory bodies. Use recall to search the index or retrieve full content when the index is truncated.
  • remember: save a fact, rule, or lesson with a required scope, optional tier, and optional topic. The tier defaults to profile. Saving the same title in the same scope and topic updates that memory. Existing ambiguous duplicates must be resolved first.
  • recall: search by query, retrieve by ID, or list entries. Query results return at most the top 20 matches. scope and tier filters apply to every mode, including ID lookup.
  • forget: remove a memory from active recall using the required id returned by recall({ query }). Titles, topics, and scopes are not accepted as inputs. User/project entries are deleted from their topic files; agent entries are logically deleted and remain in session history.
  • memory_list: list memories with optional scope and tier filters.
  • /remember: interactive save. Usage: /remember [agent|user|project] [profile|log|note] <content>. Omitted options default to project and profile.
  • /memory: browse, search, filter, copy, and delete memories. Use --scope agent and --tier note with ordinary search text, or cycle scope with Tab and tier with Shift+Tab in the overlay. Press Ctrl+L to clear scope and tier filters without clearing the search text.

Storage

Persistent user and project memories are Markdown files under ~/.pi/memory/:

~/.pi/memory/
  user/
    MEMORY.md
    general.md
  projects/
    <project-id>/
      MEMORY.md
      general.md

Topic Markdown and indexes are written in the 0.3.3-compatible @entry format. Tier metadata is stored in a versioned adjacent <topic>.memory-layer-tiers.json sidecar, so a 0.3.3 writer can read and rewrite topic files without erasing memories. Existing 0.4.0 v2 markers, old @entry markers, and indexes remain readable. The current reader restores sidecar tiers after an old 0.4.0 writer rewrites a topic as v2. Legacy entries without sidecar metadata default to profile, and metadata-looking text in a memory body stays ordinary text.

Do not mix an already-running 0.4.0 writer with a 0.3.3 writer: the former can write v2 markers that the latter does not recognize, so a following 0.3.3 save can overwrite those entries. Stop or reload all old 0.4.0 runtimes before allowing a 0.3.3 writer to access the same storage. Session-scoped agent memories use Pi session custom entries, rather than the persistent directory. Forgetting an agent memory appends a tombstone to session history, so it stays logically deleted after reopening the session.

When PI_CODING_AGENT_DIR is set to a custom path, persistent memories are isolated under $PI_CODING_AGENT_DIR/memory/. An explicit normalized default path such as ~/.pi/agent still uses the existing ~/.pi/memory/ storage. Changing a custom path does not migrate data; copy or migrate the directory explicitly if that is intended.

Project ID resolution

Project identity resolves automatically:

  1. git remote origin URL, normalized to a slug
  2. Root commit hash
  3. CWD path hash

Install

pi install npm:@ryan_nookpi/pi-extension-memory-layer