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

v0.2.0

Published

Local web UI for exploring, searching, and saving notes or bundles from pi sessions

Readme

pi-session-browser

Local web UI for exploring, searching, and saving notes or bundles from pi sessions.

Why

Pi stores every conversation as a JSONL session file. Over time you end up with hundreds of sessions across many projects. This tool gives you a fast, searchable, local browser for all of them — no cloud, no uploads, everything stays on your machine.

Features

  • scan ~/.pi/agent/sessions (or custom path)
  • watch the sessions directory: new and updated sessions are indexed within seconds, no manual reindex
  • persistent summary cache: only changed sessions are re-parsed on startup
  • group sessions by project / cwd
  • live SQLite FTS5-backed full-text search with label: and project: filters
  • full-text indexing of compaction and branch summaries for better long-session recall
  • conversation view with timeline + branch modes
  • show/hide entry types (user, assistant, tool output, summaries) in both the conversation excerpt and the full transcript, remembered across sessions
  • tree-aware stats: branch points, compactions, branch summaries, labels
  • jump from labeled checkpoints into the branch view
  • copy deep link, resume command, or session note
  • save session notes to disk
  • multi-select sessions across projects and save a deterministic markdown bundle
  • query-aware project list with match counts
  • sort results by smart/default ordering, best match, newest, oldest, or most entries
  • keyboard navigation: / focuses search, j/k or arrow keys move through sessions, Enter opens the full transcript, Esc clears search
  • shareable URLs: the current search query and selected session live in the URL hash, so links and bookmarks restore both
  • inspect search matches with surrounding transcript context
  • open the full transcript in a scrollable browser tab with pi entry IDs
  • copy an explicit pi /tree handoff from any search match
  • create a deterministic forked session from a search match and copy its resume command
  • adapts to your active pi theme automatically

Run

Via npm:

npx pi-session-browser

Or from source:

git clone https://github.com/omaclaren/pi-session-browser.git
cd pi-session-browser
npm install
npm start

The browser opens automatically at:

http://127.0.0.1:4314

Flags

npx pi-session-browser --headless                              # do not open browser on launch
npx pi-session-browser --no-open                               # alias for --headless
npx pi-session-browser --port 4315                             # custom port
npx pi-session-browser --sessions-dir "/path/to/sessions"      # custom sessions directory
npx pi-session-browser --index-db "/path/to/index.sqlite"      # custom index location
npx pi-session-browser --notes-dir "/path/to/notes"            # custom notes directory

When running from source, pass flags after --, e.g. npm start -- --headless.

Environment variables

  • PI_SESSION_BROWSER_PORT
  • PI_SESSION_BROWSER_SESSIONS_DIR
  • PI_SESSION_BROWSER_INDEX_DB
  • PI_SESSION_BROWSER_NOTES_DIR

Settings

Follows a pi-like global/project configuration style.

  • Global: ~/.pi-session-browser/settings.json
  • Project-local: .pi-session-browser/settings.json

Example:

{
  "port": 4314,
  "sessionsDir": "~/.pi/agent/sessions",
  "indexDbPath": "~/.cache/pi-session-browser/sessions.sqlite",
  "notesDir": "~/.pi-session-browser/notes"
}

Relative paths in settings files are resolved relative to the settings file location.

Config precedence: CLI flags → env vars → project settings → global settings → built-in defaults.

Built-in defaults:

| Setting | Default | |---------|---------| | Notes | ~/.pi-session-browser/notes | | Search index | ~/.cache/pi-session-browser/sessions.sqlite | | Sessions | ~/.pi/agent/sessions |

You can also change the notes folder from the browser UI at runtime.

Development

npm run typecheck
npm start            # run from TypeScript source via tsx
npm run build        # compile to dist/ (used by the npm bin entry)

License

MIT