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

@pratikgajjar/pi-recall

v0.2.6

Published

pi extension: search your past AI chat history (Cursor, Claude Code, Codex, pi) via the recall CLI

Readme

pi-recall

A pi extension that lets the agent search your past AI chat history — across Cursor, Claude Code, Codex, and pi — without you copy-pasting transcripts.

It's a thin wrapper over the recall CLI, which indexes your conversations into a local SQLite FTS5 index. The extension shells out to that binary and exposes the index to the agent as tools.

recall_search running inside pi

The agent calls recall_search to find a past conversation, then reads it in full with recall_transcript — no copy-paste.

Install

pi install npm:@pratikgajjar/pi-recall

The prebuilt recall binary for your platform ships inside the package, so pi install / pi update keep the extension and the binary in lockstep — no separate go install or brew. The extension resolves the binary in this order: --recall-bin flag -> RECALL_BIN env -> bundled binary -> recall on PATH.

Then build the index once:

recall index        # one-time, ~1 minute on real data
recall doctor       # confirm sources are detected

For local development, load the extension ad-hoc:

pi -e ./packages/pi-recall/src/index.ts

Tools

| Tool | What it does | | --- | --- | | recall_search | Full-text search over past sessions. Returns ranked hits with matched excerpts and a session id. | | recall_transcript | Read a session in full — by session_id, or omit it for the most recent session (filterable by repo/source/since). | | recall_sessions | List recent sessions (titles + ids, no bodies). | | recall_related | Given a session id, find other sessions on the same topic. |

All tools accept repo (pass "." for the current project), source (cursor | claude | codex | pi), and since (e.g. 7d).

Navigating large sessions

Some sessions are huge (thousands of messages). recall_transcript takes three extra params to slice instead of dumping everything:

  • range — Python-style slice over the message list: ":100" first 100, "-50:" last 50, "305:315" window. Negative indices count from the end.
  • outline — one line per message: [N] role: first-line. A cheap table of contents you can scan before slicing in.
  • role — comma-separated allowlist: "user,assistant" (skip tool noise), "user" (just the prompts), "tool". Tool-related labels (toolResult, toolCall, function_call, …) all collapse to tool. In long agent loops, ~50% of messages are tool noise; in some, 98% — a 30k-msg session shrinks to ~600 with role="user".

Every rendered message carries its own ## msg N/TOTAL role header so any slice is self-locating. Default-cap: if a session has more than 200 messages and you ask for neither range nor outline, the tool returns the outline (plus a one-line note explaining how to drill in) instead of a context-blowing wall of text. After a recall_search hit at msg_idx=N, prefer range: "N-5:N+5" over reading the whole session.

Recommended agent prompt

Drop into your project's AGENTS.md / CLAUDE.md:

When the user refers to earlier work ("how did we fix…", "continue the…"),
use the recall tools to find and read the relevant past AI session first.

Staying fresh

Because the extension is a long-lived process, it keeps the index warm in the background so searches always reflect your latest conversations — you never pay an index rebuild on the query path:

  • On session start it runs an incremental recall index to catch up on anything that changed since your last pi session.
  • After each agent turn it debounces a background refresh, so the session you're in right now is searchable moments later.

The incremental index is append-only (it reads just the new lines of changed session files), so each refresh is typically tens of milliseconds. Disable it with --recall-auto-index=false or RECALL_AUTO_INDEX=0 and refresh manually via /recall-index.

Commands

  • /recall-health — runs recall doctor (CLI status + detected sources).
  • /recall-index — rebuilds the index (recall index; pass --full for a full rebuild).

Configuration

| | | | --- | --- | | --recall-bin PATH flag / RECALL_BIN env | Path to the recall binary. Default: recall on PATH. | | --recall-auto-index=false flag / RECALL_AUTO_INDEX=0 env | Turn off the background index refresh (on by default). |

License

MIT.