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

@eagle4302/pi-recap

v0.1.1

Published

Grok-style recap block after every exchange for the pi coding agent: a cheap model writes a 2-4 line status summary at the end of each reply.

Downloads

332

Readme

@eagle4302/pi-recap

A Grok-style recap block appended to the end of every reply in the pi coding agent.

Recap · openai/gpt-5-mini
- Fixed the crash when you switch sessions in the middle of a reply.
- Tests all pass (24) and the new version is published.
- Still open: the on/off setting is not remembered.

The recap is two or three plain-language lines: what happened, and what is still open. Each exchange gets its own block at the end of the transcript, written by a cheap model in the background. It reads like part of the conversation, and because it is a custom entry it never enters the LLM context — the main model's prompt stays exactly as it would be without this extension.

Install

pi install npm:@eagle4302/pi-recap     # writes to ~/.pi/agent/settings.json
pi -e npm:@eagle4302/pi-recap          # or try it for one session, without installing

Use --local to install into the project (./.pi/settings.json) and pi remove npm:@eagle4302/pi-recap to uninstall.

Usage

Everything is automatic: when an exchange settles, a recap is written and appended. The same exchange is never recapped twice.

| Command | What it does | | --- | --- | | /recap | Write a recap of the current exchange right now | | /recap on / /recap off | Turn automatic recaps on or off (session only) | | /recap model <provider>/<model> | Pin the recap model, e.g. /recap model openai/gpt-5-mini | | /recap model auto | Go back to automatic model selection | | /recap status | Show the current settings and the model that would be used |

Which model writes the recap

By default the extension asks pi for the models you have credentials for and picks the cheapest one that can do the job: it must accept text and have a context window of at least 16k tokens, and it is scored by cost.input + 4 × cost.output per million tokens (output is weighted heavier because the transcript is long on the way in and short on the way out).

If nothing qualifies, an automatic recap warns once per session and stays quiet after that. Pin a model with /recap model … if you would rather choose.

Requirements and limits

  • The pi coding agent, in interactive (TUI) mode. Recaps render into the transcript, so print/JSON/RPC runs never summarise automatically (/recap still works if you ask for it).
  • One extra model call per exchange, with a truncated transcript (max 12k characters, tool output capped). Failed and aborted turns are skipped.
  • Settings (on/off, the pinned model) live for the session only; the default is always "on, automatic model".

Privacy

The exchange transcript — the user message, assistant text, tool calls, and truncated tool output from that exchange — is sent to whichever model you configured or pinned, and to nobody else. The extension has no telemetry, no network code of its own, and no dependencies beyond pi itself.

Development

npm test          # loads the real extension with pi's TS loader, 24 checks
npm run verify    # pre-publish checks: metadata, shipped files, privacy, policy

npm test needs a pi installation; it looks at $PI_PACKAGE_DIR, then ./node_modules, then the usual global npm locations.

License

MIT. Not affiliated with xAI or Grok — the recap block is inspired by Grok CLI's.