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

@jmcombs/pi-notify

v1.1.0

Published

Terminal-emulator notifications (OSC 777/9/99) for the Pi coding agent — alerts you when Pi finishes a turn. Works in Ghostty, iTerm2, WezTerm, Kitty, etc. Zero OS binaries or dependencies.

Readme

@jmcombs/pi-notify

A Pi coding agent extension that sends a notification via your terminal emulator's native system (OSC 777/9/99) when Pi finishes a turn and is waiting for your input — so you can switch away while Pi works and get tapped on the shoulder the moment it's done. Works in Ghostty, iTerm2, WezTerm, Kitty, etc. with zero OS binaries or dependencies.

Install

# Globally (recommended)
pi install npm:@jmcombs/pi-notify

# For a single session, without installing
pi -e npm:@jmcombs/pi-notify

What It Adds

  • Event hook: agent_end — automatically sends a terminal notification (via OSC) each time the agent finishes a turn and is waiting for input.
  • Command: /notify [message] — sends a one-shot test notification. Useful for verifying the extension is working after install. Defaults to "Waiting for your input" when called with no argument.

No tools are registered. The LLM does not call this extension directly.

Terminal Support

Notifications are delivered using the terminal emulator's built-in OSC notification protocols (no OS daemons, no extra packages, no binaries). Supported terminals:

| Terminal Emulator | Protocol | Notes | | ---------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------- | | Ghostty (recommended) | OSC 9 | Auto-detected via TERM_PROGRAM. Requires macOS notification permission + desktop-notifications = true (default). | | iTerm2 | OSC 9 | Auto-detected via TERM_PROGRAM / ITERM_SESSION_ID. | | WezTerm | OSC 777 | Full support. | | Kitty | OSC 99 | Auto-detected via KITTY_WINDOW_ID. | | rxvt-unicode | OSC 777 | Full support. | | Windows Terminal (via WSL) | OSC 777 | When WT_SESSION is present. | | tmux (inside a supported terminal) | wrapped | DCS passthrough applied automatically when TMUX env var is set. |

Unsupported (examples: Apple Terminal, Alacritty, base Windows console): the extension shows a message in the Pi TUI and recommends filing an issue at https://github.com/jmcombs/pi-extensions/issues.

No permissions dialogs or extra setup are required for most terminals. Desktop notification appearance (banners, sounds, persistence) is controlled entirely by your terminal emulator + OS notification center settings. Configure those in the terminal's preferences and/or macOS System Settings → Notifications. This extension emits no audio or OS notifications itself.

Ghostty on macOS

Ghostty enables OSC notifications by default (desktop-notifications = true). For the desktop notification to appear as a banner:

  1. Permissions: System Settings → Notifications → Ghostty → Allow notifications. Set Alert Style to "Banners" (temporary) or "Alerts" (persistent).
  2. (Optional) Config: Add to your Ghostty config if you had disabled it:
    desktop-notifications = true
    (Restart Ghostty or use ghostty +reload-config after changes.)
  3. Testing: Run /notify Test Notification. Banners typically only appear when the Ghostty window is unfocused (background). When focused, check Notification Center; Ghostty may show a brief in-window indicator.

If no notification appears despite the above, the sequence was still written (successfully detected by the /notify command). Check Ghostty logs or file an issue.

Requirements

  • Pi >= 0.72.0
  • Node >= 22.0.0
  • No API keys or additional configuration required

Development

This package lives in the pi-extensions monorepo.

# From the repo root
npm ci
npm run check       # full quality gate

# Try local changes against a real Pi session
pi -e ./packages/notify

The smoke test in index.test.ts verifies registration shape only — no OSC sequences or external calls are made during testing. Real end-to-end behaviour (terminal notifications) is exercised via pi -e.

License

MIT © Jeremy Combs