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-recap

v0.8.21

Published

Session recap panel for pi coding agent. Always-visible widget showing the current goal and last few conversation turns with live streaming updates. Auto-selects the fastest, cheapest summarization model using pi-bench benchmark data.

Readme

pi-recap

pi-recap banner

Never scroll back to remember what you were doing.

An always-visible session recap panel for pi coding agent showing the current goal and last few conversation turns with live streaming updates.

pi-recap screenshot

Banner and screenshot images created with pi-banana.

Features

  • Auto-derived session goal — the title updates automatically after the first turn using a fast LLM
  • Turn history — last 4 recaps with timestamps, speaker tags (you / pi), and fade-to-dim for older entries
  • Live streaming — breathing dot while thinking, caret blink during token arrival, 180ms settle animation on completion
  • Keyboard navigationCtrl+Shift+R to focus, ↑↓ to scroll older entries, Esc to release
  • Slash commands/goal to override the title, /recap-model to pick the summarization model, /recap-blacklist to manage the model skip-list
  • Theme-agnostic text colors — recap headline and body use hardcoded high-contrast colors that work on any theme (light or dark)
  • Cheap summarization — auto-selects the fastest/cheapest available model (flash/mini/haiku/turbo) to keep costs near zero. Curated chain and blacklist seed are imported from pi-bench, the source of truth for bench data.

Installation

Pi auto-discovers extensions from ~/.pi/agent/extensions/. Clone the repo there:

git clone https://github.com/fornace/pi-recap.git ~/.pi/agent/extensions/pi-recap
cd ~/.pi/agent/extensions/pi-recap
npm install

Restart pi. The recap panel appears above the editor after your first message.

Usage

The panel is passive — it just shows the last few turns. No configuration needed.

| Shortcut | Action | |---|---| | Ctrl+Shift+R | Focus the recap panel | | / | Navigate older entries (while focused) | | Esc | Release focus |

Slash commands

Type /recap for the interactive menu. No arguments needed — everything is selection-based.

| Menu path | Description | |---|---| | /recapgoal: ... | Set/override the session goal (text input) | | /recapclear goal | Remove override, return to auto-derivation | | /recapmodel: ... | Pick from available fast models (select list) | | /recapclear model | Remove model override | | /recapblacklist: N entriesview / add / remove / reset / re-seed | Manage the model skip-list |

Architecture

pi-recap/
├── index.ts           # Extension entry point (hooks, slash commands, state management)
├── state/
│   ├── state.ts       # HistoryEntry type, speaker enum
│   ├── store.ts       # In-memory state + persistence (session branch entries)
│   ├── replay.ts      # Restore state from session entries on restart
│   └── blacklist.ts   # Persistent model skip-list
├── subagent/
│   ├── recap.ts       # User & agent recap generation (streams from cheap model)
│   ├── goal.ts        # Session goal derivation (streams from cheap model)
│   └── picker.ts      # Model selection chain: override → cache → curated → ctx.model
├── ui/
│   ├── status-widget.ts  # TUI component (rendered above editor)
│   └── anim.ts        # Animation primitives (streaming dot, settle sweep, color utilities)
└── util/
    ├── date.ts        # Timestamp formatting ("now", "14m", "14:30")
    └── log.ts         # Best-effort debug logging

Model picker chain

The summarization model is selected through a 4-layer chain (top wins):

  1. User override — set via /recap-model <id>
  2. Cached winner — 24h TTL from last successful run
  3. Curated chain — fast/cheap models imported from pi-bench, ordered by bench rank
  4. Session model — pi's configured model (sacred fallback, never blacklisted)

Development

cd ~/.pi/agent/extensions/pi-recap
npm install        # types + typescript
npx tsc            # type-check (no emit, jiti loads .ts directly)

Pi loads .ts files via jiti — no build step needed during development.

Testing

npx tsx test-recap.ts            # test recap/goal generation with mock registry
npx tsx test-recap-models.ts     # test model picker chain against real registry

License

MIT

From the same author

By Francesco Frapporti at Fornace.

  • pi-bench — LLM benchmark toolkit for pi. Probes every model to find the fastest and cheapest. This extension uses pi-bench data to pick summarization models.
  • pi-banana — Generate and edit images inside pi using Google Nano Banana. The banner and screenshot images above were created with pi-banana.
  • pi-alibaba-models — Complete Alibaba provider for pi: Qwen, DeepSeek, Kimi, GLM, MiniMax with native thinking levels.
  • pi-notte-theme — Notte: a true-dark pi theme where darkness has color and text glows like terminal phosphor.

Changelog

0.8.16

  • Fixed double-render of the recap panel during pi-tui startup. The widget now registers on first user input (before_agent_start) instead of session_start, preventing the panel from appearing twice when pi first launches.
  • Added raw Enter keypress listener via onTerminalInput to bump the decoy row at the earliest possible moment, before pi processes the submit. This gives maximum time for the decoy to clear orphaned border fragments in scrollback. The listener skips when the recap widget has focus and never consumes the keypress.