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

@lukemelnik/pi-monitor

v0.2.0

Published

A Pi extension and CLI for monitoring live Pi agents and jumping to their tmux panes.

Readme

pi-monitor — live Pi agent monitor

A Pi package that tracks running Pi agents and provides a small CLI for seeing what each one is doing. If an agent was launched inside tmux, the watch UI can jump directly to its pane.

pi install npm:@lukemelnik/pi-monitor

Features

  • Live agent registry — each running Pi instance writes a heartbeat with status, cwd, model, session, and active tool info.
  • Interactive monitorpi-monitor --watch shows live agents and updates once per second.
  • Native Pi view/pi-monitor opens the same live monitor inside Pi.
  • Tmux pane jump — press Enter on an agent launched inside tmux to switch to that pane.
  • Context usage — shows current context consumption as a compact bar when Pi exposes usage data.
  • Optional recap integration — shows session recap markers when pi-session-recap is installed.
  • Stale cleanup — dead processes and old heartbeat files are pruned automatically.

Install

Install from npm:

pi install npm:@lukemelnik/pi-monitor

For local development or testing:

pi install /absolute/path/to/pi-monitor

The package includes both the Pi extension and the pi-monitor CLI. A global Pi npm install links the CLI so it can be run directly from your shell.

Usage

Open the monitor inside Pi:

/pi-monitor

Print a one-shot table:

pi-monitor

Open the interactive watcher:

pi-monitor --watch

Keys in watch mode and the native Pi view:

| Key | Action | |-----|--------| | j / | Move down | | k / | Move up | | Enter | Jump to the selected tmux pane, if available | | q / Esc / Ctrl-C | Exit |

Other options:

pi-monitor --version
pi-monitor --help
pi-monitor --ttl-ms 60000
pi-monitor --no-color

How it works

The Pi extension runs inside each Pi process and writes one small heartbeat file per live instance:

~/.pi/agent/monitor/live/<pid>-<instanceId>.json

The file is overwritten in place every few seconds. Normal shutdown removes it. If Pi crashes, later monitor runs prune stale files and dead PIDs.

The CLI is separate from Pi at runtime. It reads the heartbeat directory, renders the table, and uses tmux only for the optional pane jump action.

Context usage

When available, context usage is shown in the table and inspector:

CTX  ████░░░░░ 44%

Right after startup, reload, or compaction, Pi may not know token usage yet. In that case the monitor shows until usage data is available again.

Optional recap integration

If @lukemelnik/pi-session-recap is installed, pi-monitor reads its saved session recap entries and shows a marker plus the recap in the inspector.

pi install npm:@lukemelnik/pi-session-recap

This is optional. Pi-monitor still works without the recap package.

Development

npm run check

Release commands:

npm run release:patch
npm run release:minor
npm run release:major
npm run publish:release

npm version updates package.json, updates package-lock.json when present, creates a release commit, and creates a vX.Y.Z git tag.

License

MIT