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-session-search

v0.1.0

Published

Index, summarize, and search past pi sessions. Covers both active and archived sessions, enabling semantic search and introspection over your coding history.

Readme

pi-session-search

Index, summarize, and search past pi coding sessions. Provides semantic search across your entire session history — both active and archived sessions.

Features

  • Semantic search — Find past sessions by topic, not just keywords (session_search)
  • Browse & filter — List sessions by project, date range, archive status (session_list)
  • Read conversations — View the full conversation from any past session (session_read)
  • Auto-indexing — Parses JSONL session files on startup, tracks changes incrementally
  • Archive support — Indexes both ~/.pi/agent/sessions/ and ~/.pi/agent/sessions-archive/
  • Multiple embedders — OpenAI, AWS Bedrock, or local Ollama

Install

pi install pi-session-search

Or add to ~/.pi/agent/settings.json:

{
  "packages": ["npm:pi-session-search"]
}

Setup

Run /session-search-setup in pi to configure the embedding provider:

  • OpenAI — Uses text-embedding-3-small (needs OPENAI_API_KEY)
  • Bedrock — Uses Titan Embeddings v2 (needs AWS credentials)
  • Ollama — Uses nomic-embed-text (needs local Ollama running)

Config is stored at ~/.pi/session-search/config.json.

Usage

Semantic search

session_search(query="how did we debug the Lambda timeout")
session_search(query="CI pipeline configuration", limit=5)

Browse sessions

session_list(project="Rosie", after="2026-03-01")
session_list(archived=true, limit=20)

Read a session

session_read(session="<file-path-or-uuid>")
session_read(session="<id>", offset=50, limit=50)

Commands

| Command | Description | |---------|-------------| | /session-search-setup | Configure embedding provider | | /session-reindex | Force full re-index of all sessions |

How It Works

  1. On startup, discovers all .jsonl session files in ~/.pi/agent/sessions/ (and ~/.pi/agent/sessions-archive/ if it exists)
  2. Parses each session to extract: user messages, assistant text, tool calls, files modified, models used, compaction summaries
  3. Generates a summary and embedding for each session
  4. Stores the index at ~/.pi/session-search/index/
  5. On subsequent startups, only re-indexes new or changed sessions
  6. Re-syncs in the background every 5 minutes to pick up new sessions

You can also configure extra session/archive directories during setup if you store sessions in non-default locations.

Environment Variables

| Variable | Description | |----------|-------------| | OPENAI_API_KEY | Required for OpenAI embedder |

License

MIT