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

v0.2.2

Published

Pi session search, ask, handoff, auto-titling, and indexing tools

Readme

pi-sessions

pi-sessions turns your old Pi sessions into something you can actually reuse. It gives you search, follow-up Q&A, deliberate handoffs into new child sessions, automatic session titles, and a local index that keeps future sessions searchable.

Screenshots

Session lookup

session picker

Handoffs

handoff preview

Ask about old sessions

session_search tool

session_ask tool

Install

From npm (recommended):

pi install npm:pi-sessions

If you want to run directly from a local clone while developing:

pi -e /absolute/path/to/pi-sessions

Quick start

  1. Install the package.
  2. Open Pi and run /session-index.
  3. Press r to build the index for all your prior sessions.
  4. Try the main flows:
What session did I implement the db layer?
/handoff i want to implement the frontend component now

Features

| Extension | Surface | What it does | | ------------------ | ------------------------------------- | ------------------------------------------------------- | | Session Search | session_search pi tool | Search through old sessions | | Session Ask | session_ask pi tool | Ask questions about old sessions | | Session Handoff | /handoff, session picker shortcut | Start a focused new session; alternative to compaction | | Session Picker | Alt+O | Reference old sessions in your prompt | | Session Index | /session-index slash command | Shows index status and rebuilds the local session index | | Session Auto Title | in background, /title slash command | Give sessions titles |

Session Handoff

/handoff <goal> starts a focused new session. Give pi a goal, and it will generate a prompt for you to review before kicking it off.

You can either start a new session directly in your current one, or if you have Ghostty on macOS, you can spawn a new one in a split-pane and continue in your current:

  • /handoff --left <goal>
  • /handoff --right <goal>
  • /handoff --up <goal>
  • /handoff --down <goal>

The flag indicates the Ghostty split direction.

Flow:

  • run /handoff [--<direction>] <goal>
  • review the generated prompt preview
  • optionally edit the prompt
  • start the new session

If you do nothing, the preview autostarts after a short countdown.

Session picker

Directly reference prior sessions by looking them up by contents.

  • shortcut: Alt+O
  • press Tab to switch between current folder and all sessions
  • type to filter results
  • press Enter to insert a session id into your prompt

Handoff setting

If you want to override the shortcut, put this in your ~/.pi/agent/settings.json:

{
  "sessions": {
    "handoff": {
      "pickerShortcut": "alt+p"
    }
  }
}

Session Index

By default, pi-sessions will start indexing all conversations moving forward. If you want to backfill all prior conversations:

  • run /session-index
  • hit r to (re)index everything

this is idempotent, so if you run into any issues, or disable pi-sessions for a while, feel free to re-index to see if that resolves anything.

By default the index lives at:

~/.pi/agent/pi-sessions/index.sqlite

but you can change the location in ~/.pi/agent/settings.json:

{
  "sessions": {
    "index": {
      "dir": "~/.pi/agent/pi-sessions"
    }
  }
}

Session Auto Title

The auto-title extension keeps your session list readable by:

  • Setting a title based on initial prompt
  • Reevaluating the title every 4 turns to see if it should be updated

To manage existing titles, run /title, where you can:

  • Regenerate a title for the current session
  • Generate titles for all sessions in the folder
  • Generate titles for all sessions across pi

session title window

Note that generating titles for all sessions can take some time, and will hit your configured model with the full contents of all sessions.

  • automatic retitles run every few turns
  • if you manually rename a session with /name, automatic retitling pauses for that session
  • Regenerate the title for the current session to resume automatic retitling
  • if unconfigured, it will attempt to use these models in order, first one that is available:
    • google/gemini-flash-lite-latest
    • anthropic/claude-haiku-4-5
    • openai/gpt-5.4-mini
    • your currently configured model

To change auto-titling settings, edit ~/.pi/agent/settings.json:

{
  "sessions": {
    "autoTitle": {
      "refreshTurns": 4,
      "model": "anthropic/claude-haiku-4-5"
    }
  }
}

Development

npm install
npm run check
npm test

For an end-to-end manual flow, see SMOKE.md.