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

v1.3.0

Published

Live observability dashboard for pi coding agent sessions — tokens, cost, TPS, runtime, git stats, and context usage

Readme

🔭 pi-observability

A pi extension that replaces the default footer with a live observability bar, provides a full dashboard command, and prints a TPS summary after each agent run.

Features

  • Live footer bar showing:

    • Session input/output tokens & estimated cost
    • Live TPS (tokens per second) during streaming
    • Session runtime
    • Current model, thinking level, fast mode & git branch
    • Git diff stats (added/removed lines)
    • Context usage (current / max)
    • Thinking level colors match pi's input field — off/low/medium/high use the same theme colors as the editor border
    • Rainbow modexhigh and max thinking levels render the model indicator in cycling rainbow colors
  • /obs command — Full-screen TUI dashboard with per-turn breakdowns and last 10 session history. Renders through pi's native TUI (no console spam), with theme-aware borders and dynamic terminal width.

  • End-of-run TPS notification — Prints the legacy TPS summary after each agent run: output TPS, input/output tokens, cache read/write tokens, total tokens, and elapsed time.

  • /obs-toggle command — Toggle the live footer on/off

Preview

Screed recording

GitHub does not render inline MP4 players in README.md, so here's a short animated preview. Click it to open the full recording.

Animated preview of pi-observability

Open the full screed recording (MP4)

Footer

Compact single-line layout that falls back to two lines when the terminal is narrow:

gpt-5.5:high ▸ ⏱ 12:34 ▸ 📁 my-app ▸  main +42 -7 ▸ ctx 4.2k/200k ▸ ↑1.2k ↓3.4k ▸ ⚡45.2 ▸ $0.0042

With xhigh or max thinking, the model name renders in rainbow:

gpt-5.5:xhigh ▸ ⏱ 12:34 ▸ 📁 my-app ▸ ↑1.2k ↓3.4k ▸ ⚡45.2 ▸ $0.0042

Git diff in the status bar

Git diff in the footer status bar

Dashboard (/obs)

┌──────────────────────────────────────────┐
│ Agent Observability Dashboard            │
├──────────────────────────────────────────┤
│ Runtime: 12:34    Dir: ~/projects/my-app │
│ Branch: main    Model: claude-sonnet-4   │
├──────────────────────────────────────────┤
│ Tokens: ↑1.2k ↓3.4k                      │
│ Cost: $0.004200                          │
└──────────────────────────────────────────┘

  TURNS  (2)
  #   Input   Output   Time   TPS    Cost    Model
  ─────────────────────────────────────────────────
  1   ↑450    ↓1200    0:45   26.7   $0.00   claude-sonnet-4
  2   ↑320    ↓900     0:32   28.1   $0.00   claude-sonnet-4

  LAST 10 SESSIONS
  When                Duration   Turns   Input   Output   Cost
  ───────────────────────────────────────────────────────────
  Apr 18, 04:19 PM    9:05       10      ↑110k   ↓9.9k    $0.00

Install

Via npm

pi install npm:pi-observability

Via git

pi install git:github.com/imran-vz/pi-observability

Manual

Copy the entire extensions/ directory to ~/.pi/agent/extensions/ (or .pi/extensions/ for project-local):

cp -r extensions/* ~/.pi/agent/extensions/

Note: This extension is split into multiple files (observability.ts + lib/). Copying only the main file will break imports.

Commands

| Command | Description | |---------|-------------| | /obs | Open full observability dashboard in TUI overlay | | /obs-toggle | Toggle the observability footer on/off | | /obs-toggle-path | Toggle between folder name and full path in footer |

Migration from TPS

The standalone TPS extension is no longer required. pi-observability now includes its end-of-run TPS notification, so remove ~/.pi/agent/extensions/tps.ts if it is installed to avoid duplicate notifications.

Requirements

  • pi coding agent
  • Git (for branch & diff stats)

License

MIT