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-monitor-plugin

v0.1.1

Published

Background, monitor, loop, and schedule jobs for the pi coding agent, with idle-aware session notifications. Ships a skill that watches GitHub for PRs awaiting your review and notifies your session.

Downloads

352

Readme

pi-monitor-plugin

Background, monitor, loop, and schedule jobs for the pi coding agent, with idle-aware session notifications and a TUI job indicator. Ships as a standard pi package: one extension plus one skill.

Status: planning / scaffold. The architecture and milestones live in PLAN.md; the deep research backing them lives in docs/research/. The job engine is not implemented yet. This is the pi-native successor of opencode-monitor-plugin — and because pi extensions run in-process with first-class message injection, it needs none of the HTTP-bridge/MCP machinery the OpenCode version required.

The flagship use case

A monitor runs a watcher script; the script polls GitHub for pull requests awaiting your review and notifies your pi session:

/monitor --regex '^PI_EVENT ' -- ./skills/github-pr-watch/scripts/watch-prs.sh --interval 300

When a new review request appears, the session receives a structured event, summarizes the PR, and asks whether you want to start reviewing — politely: by default it never interrupts a turn that is already running.

Capabilities (planned surface)

  • /background <command> — run a long shell command without blocking the current turn; get the capped output tail when it exits.
  • /monitor --regex <pattern> [--before N] [--after N] [--debounce S] -- <command> — watch a long-running command's output, deliver matching windows with context.
  • /loop <interval> <prompt> — repeat a prompt; ticks missed while the agent is busy coalesce into one delivery.
  • /schedule in <duration> <prompt> / /schedule at <iso-date> <prompt> — one-shot future prompt.
  • /jobs / /cancel <jobID> — inspect and stop jobs.
  • AI-callable tools (jobs_background, jobs_monitor, jobs_loop, jobs_schedule, jobs_list, jobs_cancel) so the agent can start jobs itself.
  • Idle-aware delivery: busy sessions get a toast immediately and the message on the next turn boundary; --deliver steer opts a watcher into interrupting.
  • Footer/widget indicator of active jobs.

Other things a watcher can do

CI run babysitting, deploy watch, tail -f error watch, issue triage, test-on-save, Dependabot/security alerts, release watch, long-build completion pings, disk-quota sentinels, k8s crashloop watch — anything that can print a PI_EVENT line (see PLAN.md §3.4 for the protocol).

Install

Requires Node ≥ 22.19 and pi ≥ 0.79. The GitHub watcher additionally needs an authenticated gh CLI — the plugin never touches tokens itself.

# from npm (once published)
pi install npm:pi-monitor-plugin

# from git, today
pi install git:github.com/Shodocan/pi-monitor-plugin

# try without installing
pi -e git:github.com/Shodocan/pi-monitor-plugin

# project-local (shared with your team via .pi/settings.json)
pi install -l npm:pi-monitor-plugin

Local development:

git clone https://github.com/Shodocan/pi-monitor-plugin
cd pi-monitor-plugin && npm install
pi -e .          # ad-hoc load for the current run

There is no build step: pi loads the TypeScript extension directly (jiti).

Security model

  • Pi packages run with full system access — review the source before installing, as with any pi package.
  • Commands run through POSIX /bin/sh -c in their own process group; cancellation is SIGTERM → 5s grace → SIGKILL.
  • Delivered process output is nonce-fenced (so untrusted output cannot impersonate instructions), ANSI/control-stripped, and best-effort secret-redacted.
  • Regex patterns are length-capped and ReDoS-vetted before a monitor starts.
  • The GitHub watcher stores no credentials — it relies entirely on ambient gh auth, and keeps only seen-PR ids under ~/.local/state/pi-monitor/.

Development

npm install
npm run typecheck
npm test

Before any release: npm pack --dry-run and a secret scan over the pack list.

License

MIT