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

@raidou/pi-notify

v0.7.3

Published

Desktop notification extension for the pi coding agent.

Readme

@raidou/pi-notify

A notification extension for the pi coding agent.

@raidou/pi-notify fires a native desktop notification on idle, tool calls (optional, e.g. Tool call: ask_user), user-facing UI prompts (via pi's ui_prompt_start, e.g. permission approvals or select/confirm/input dialogs, requires pi >= 0.85.0), and custom pi events.

Installation

pi install npm:@raidou/pi-notify

Or, for local development

cd path/to/pi-notify
pi install .

Configuration

All options live under the piNotify key in ~/.pi/agent/settings.json. Everything is optional.

{
  "piNotify": {
    "enabled": true, // master on/off switch (default: true)
    "notifyTools": [], // tools that trigger "Tool call" notifications (default: empty, i.e. no tool notifications)
    "tmuxSymbol": "🔔", // symbol appended to tmux window title (empty string to disable)
    "finished": true, // enable/disable "Idle" notification
    "events": {
      "my:custom:event": "Custom event triggered", // custom event channel -> notification message
      "other:event": false, // set to false to disable a specific event
    },
    "finishedThrottleSecs": 0, // 0 = always notify; >0 = skip finished toasts for runs shorter than N seconds
    "onlyNotifyWhenUnfocused": true, // only notify when user has been inactive
    "unfocusedActivityThresholdSecs": 30, // seconds of inactivity before considering user "unfocused"
  },
}

What triggers a notification

| Event | Source | Default body | | ----------------- | --------------------------------------------------------------------- | --------------------------------- | | Finished | agent_settled (pi idle, no active jobs) | Idle | | Tool calls | tool_call on tools in notifyTools (default: none) | Tool call: <toolName> | | UI prompts | ui_prompt_start (requires pi >= 0.85.0) | Waiting: <kind>[ — <title>] | | Custom events | Custom pi event channels configured in events | Customizable | | External API | pi.events.emit('pi-notify:notify', 'message') from other extensions | The emitted message |

Job tracking for background tasks

Extensions running background tasks can prevent spurious "Idle" notifications by emitting job lifecycle events. Notifications on agent_settled are suppressed while jobs are active. Custom event notifications are soft dependencies: if a package that broadcasts a specific event is not installed, that notification is skipped.

import { JOB_START_EVENT, JOB_END_EVENT } from '@raidou/pi-notify'

function startBackgroundJob(jobId: string): void {
  pi.events.emit(JOB_START_EVENT, { id: jobId })
}

function endBackgroundJob(jobId: string): void {
  pi.events.emit(JOB_END_EVENT, { id: jobId })
}

Events are automatically cleaned up on session_shutdown.

Commands

/notify-dashboard

Open a full-screen TUI dashboard listing all pi sessions, with summary counts (total, running, idle) and an auto-refresh every second.

Columns: SESSION_ID (last 6 chars), PID, STATE (running/idle, color-coded), PROJECT, UPTIME.

Keybindings:

  • j/k or ↑/↓ — move selection
  • x — kill (SIGTERM) the selected session
  • o — show/hide the SESSION_ID and PID columns
  • r — refresh
  • q or esc — close

/notify-test

Run /notify-test inside pi to fire a test notification. Pass a string argument (e.g., /notify-test hello) to override the body.

Platform support

@raidou/pi-notify prefers node-notifier (macOS Notification Center, Linux notify-send, native Windows toaster).

WSL2 note: node-notifier reports process.platform === "linux" and would route to notify-send, which is usually not installed under WSL and fails silently. @raidou/pi-notify detects WSL and raises a Windows toast via powershell.exe directly, so notifications reach the Windows Action Center out of the box.