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-echo-checkpoints

v0.1.0

Published

Git-stash-based per-turn checkpointing with an explicit /rewind command

Readme

pi-echo-checkpoints

Git-stash-based per-turn checkpointing, adapted from Pi's own official git-checkpoint.ts example, plus an explicit /rewind command.

Design note

Uses pi.exec("git", ["stash", "create"]) at the start of every turn — non-destructive, snapshots the working tree without touching it. Restore uses git stash apply <ref> (not pop), so restoring is itself repeatable. This is not a version-control replacement: no commit history, no diffing between checkpoints, just one working-tree snapshot per turn, bounded to the last 100 (a Map-eviction cap that keeps retention bounded without unbounded growth).

Because git stash create snapshots the whole working tree regardless of cause, bash-driven changes are captured here too, not just edit/write-tool-driven ones — broader coverage than an edit/write-only checkpoint scheme would give.

Known limitations, stated plainly rather than glossed over:

  • The very first turn in a brand-new session has no checkpoint (the current-entry tracking only populates after the first tool_result fires — inherited from the official example, not new here).
  • A checkpoint is a filesystem snapshot, not session-scoped, so it correctly captures pre-subagent state — but a subagent's own pi --no-session child process never registers checkpoints of its own turns.
  • Requires the project to actually be a git repository. git stash create fails with a non-zero exit code (verified: exit 128, fatal: not a git repository) outside one — pi.exec resolves normally with empty stdout rather than throwing, so this degrades to a harmless no-op (no checkpoints recorded, /rewind reports none available) rather than crashing a turn. This is not a hypothetical: the echo monorepo itself is not a git repository as of Phase B, so this package is presently a no-op there until git init is run.

Usage

/rewind          # list recent checkpoints reachable from the current session branch, pick one interactively
/rewind 3         # restore directly to checkpoint #3 from that list (needed in headless mode, where there's no picker)

Forking a session (/fork or similar) still offers the official example's reactive restore prompt independently of /rewind.