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

@lanlance/pi-recap

v0.3.0

Published

Claude Code-style session recap for pi: a one-line recap above the status bar tracking the session goal and current state

Downloads

615

Readme

A session recap for pi — one line, always in the know.

License: Apache 2.0 CI TypeScript

What Is This

pi-recap shows a single status line above the status bar that answers "where was I?" — the session goal and the current state. It updates automatically as you work, and stays put when nothing actually changed.

Inspired by Claude Code's /recap, rebuilt natively for pi. The recap is a pure UI widget: it never enters the model context.

pi-recap in action

Install

pi install npm:@lanlance/pi-recap

or via git:

pi install git:https://github.com/L2ncE/pi-recap

or drop extensions/recap.ts into ~/.pi/agent/extensions/ and run /reload.

Usage

Nothing to do — after 3 turns the recap appears on its own.

※ recap: Memoized Fibonacci script with CLI args; README updated
  • /recap — regenerate the recap right now
  • the recap follows the language of your session
  • it survives /resume — the last recap comes back with the session

Configuration

All optional. Add a recap block to ~/.pi/agent/settings.json (or .pi/settings.json for per-project overrides):

{
  "recap": {
    "model": "deepseek-v4-flash",
    "maxWords": 25,
    "placement": "above",
    "prompts": {
      "recap": "Output only one phrase, at most 40 words."
    }
  }
}

| key | default | description | |--------------|-------------------------|----------------------------------------------------| | model | current session model | provider/model used for generation | | maxWords | 40 | word budget; prompt and truncation follow it | | minTurns | 3 | user messages required before auto-generation starts | | cooldownTurns | 3 | regenerate only every N agent_end turns; 1 = every turn | | similarityThreshold | 0.7 | fresh recap with ≥ this word overlap keeps the displayed one | | placement | "below" | "below" = between editor and status bar, "above" = above the editor | | prompts.recap | built-in | custom system prompt, replaces the built-in one |

If the configured model is missing or unauthenticated, pi-recap falls back to your session model. A bare model id (e.g. deepseek-v4-flash) is resolved against your current session model's provider.

Other status-bar extensions? pi gives extensions only two layout areas (above/below the editor). If another extension claims the same area — e.g. pi-powerline-footer — set placement: "above", and to render the recap above that extension's status line, put pi-recap first in the packages array of settings.json. Disable its last-prompt echo with "showLastPrompt": false.

How It Works

agent_end ─► goal (first prompt) + last 3 rounds
              │
              ├─ ≥ minTurns turns?  (else skip)
              ├─ cooldown cooldownTurns (else skip)
              ├─ latest-round key changed? (else skip)
              ├─ generate (≤512 tokens, minimal reasoning)
              ├─ similar to shown? (≥ similarityThreshold overlap → keep shown)
              └─ render widget + persist

Small by design: the input is the session goal plus the last 3 rounds, truncated — about 1-2k tokens per call, fractions of a cent.

Credits

License

Apache License 2.0 — L2ncE