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-context-repo

v0.2.0

Published

Git-backed persistent memory filesystem for pi agents, inspired by Letta Code's Context Repositories

Readme

pi-context-repo

Git-backed persistent memory filesystem for pi agents, inspired by Letta Code's Context Repositories.

Install

pi install /path/to/pi-context-repo
# or after publishing:
pi install npm:pi-context-repo

How it works

Memory is stored as markdown files with YAML frontmatter in .pi/memory/ (a separate git repo inside your project).

  • system/ files are pinned to the system prompt every turn

  • Other files appear in the tree — the agent reads them on demand (progressive disclosure)

  • Git versioning tracks all memory changes with informative commits

  • Frontmatter enforces description, limit, and optional read_only per file

  • $MEMORY_DIR env var injected into shell so bash commands can reference memory

Scaffolded structure (auto-created on first run)

.pi/memory/
├── system/
│   ├── persona.md  — Agent identity and behavior
│   ├── user.md     — User preferences and context
│   ├── project.md  — Codebase knowledge and conventions
│   └── style.md    — Coding preferences
└── reference/
    └── README.md   — How to use reference/

Tools

| Tool | Description | | --------------- | -------------------------------------------------------------- | | memory_write | Write/update a memory file (auto-stages, respects read_only) | | memory_delete | Delete a memory file and stage the removal | | memory_commit | Commit staged changes with a descriptive message | | memory_search | Search memory files by content (git grep) | | memory_log | Show recent commit history | | memory_backup | Create a timestamped backup snapshot |

Commands

| Command | Description | | ------------------ | ------------------------------------- | | /memory | Show tree, status, and recent history | | /init | Initialize or re-analyze memory | | /remember [text] | Explicitly save something to memory | | /memory-diff | Show uncommitted changes | | /memory-backup | Create a timestamped backup | | /memory-backups | List available backups | | /memory-restore | Restore from a backup | | /memory-export | Export memory to a directory | | /memory-import | Import memory from another directory |

UI

  • Status widget shows uncommitted/unpushed counts in pi footer
  • Sync reminder in system prompt when changes need committing/pushing
  • Reflection reminder every 15 turns prompting memory consolidation
  • Drift detection warns about legacy/orphan memory fragments in system prompt

Design

Adapted from Letta Code's memoryGit.ts and Context Repositories concept:

  • Files as memory units with metadata frontmatter
  • system/ subdir always loaded (like Letta's pinned memory blocks)
  • File tree always visible for on-demand loading
  • Git for versioning, history, and eventual multi-agent sync
  • Natural memory application — no "I remember that..." narration
  • Git worktree helpers for isolated background edits (reflection, migration)
  • System prompt drift detection and stripping
  • $MEMORY_DIR / $PI_MEMORY_DIR env vars for shell access