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

@fyeeme/pi-session-web

v0.1.0

Published

Read-only web viewer for local pi session history: /session-web starts a localhost HTTP server with a sidebar session list, markdown-rendered conversations, folded thinking, branch visualization, and a raw trace timeline.

Readme

session-web

Read-only web viewer for local pi session history. Registers the /session-web command, which starts an HTTP server bound to 127.0.0.1 and serves the sessions stored under ~/.pi/agent/sessions/.

Pages

  • / — sidebar with sessions grouped by project directory (5 shown per group, rest behind "expand"), keyword filtering over first messages, session names, working directories, and full message text.
  • /session/:id — conversation view (default): user messages as aligned bubbles, assistant replies rendered as markdown, thinking folded, model/compaction changes as status lines, and sibling branches shown as collapsed blocks at each fork point. Tool calls are not shown here — open the trace tab for them.
  • /session/:id?view=trace — raw entry timeline (time / type / summary) for every session entry, including tool calls and results.

In the conversation view, mermaid code blocks render as inline diagrams (all chart types supported by mermaid 12), follow the light/dark theme, and open in a new tab when clicked. The mermaid library is fetched lazily from the jsdelivr CDN on first use; when offline or when a diagram fails to parse, the block degrades to the highlighted source plus an error line.

Markdown rendering follows the TUI renderer's support logic: HTML is shown as escaped text (never rendered), markdown image markup is shown as text, links show only their text, strikethrough uses strict ~~ rules, and LaTeX delimiters ($...$, $$...$$) are detected with the same heuristics and shown as text. Code blocks are highlighted with highlight.js.

The sidebar is drag-resizable (max 450px, double-click resets) and the page has a light/dark theme toggle (light by default); both persist via localStorage.

Usage

pi --extension ./examples/extensions/session-web

Then inside pi:

/session-web           # start on the default port 8765
/session-web 9000      # start on a specific port
/session-web stop      # stop the server

Open the reported URL in a browser. The server also stops automatically when the pi session ends.

Constraints

  • Read-only: the viewer never writes, edits, resumes, or deletes sessions.
  • Local only: listens on 127.0.0.1; no remote access.
  • Session ids are resolved through a filename scan of the sessions directory, so URL segments never reach the filesystem.