@bacnh85/pi-notify

Desktop notifications and sounds for Pi — fires on task completion, errors, and when the agent asks a question. Cross-platform (macOS notification center, Linux libnotify, Windows toast, plus OSC 777/99 terminal protocols). Inspired by OpenCode's attentio

Packages

Package details

extension

Install @bacnh85/pi-notify from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@bacnh85/pi-notify
Package
@bacnh85/pi-notify
Version
0.1.2
Published
Sep 12, 2026
Downloads
394/mo · 228/wk
Author
bacnh85
License
MIT
Types
extension
Size
13.8 KB
Dependencies
0 dependencies · 0 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/index.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-notify

Desktop notifications and sounds for Pi.

Fires when the agent finishes a turn, errors, or asks the user a question. Cross-platform, zero dependencies. Inspired by OpenCode's attention feature.

Install

pi install npm:@bacnh85/pi-notify

Backends

Platform Notification Sound
macOS osascript (Notification Center) afplay (Glass.aiff)
Linux notify-send (libnotify) paplay (freedesktop complete.oga)
Windows PowerShell toast (NotifyIcon) [console]::beep
Terminal OSC 777 (Ghostty/iTerm2/WezTerm/rxvt) + OSC 99 (Kitty) bell

Falls back to terminal OSC protocols when no desktop binary is available.

Configuration

Add a notify object to .pi/settings.json (project) or ~/.pi/agent/settings.json (global):

{
  "notify": {
    "onComplete": true,
    "onError": true,
    "onQuestion": true,
    "sound": true,
    "volume": 0.4
  }
}

All keys default to true (sound defaults on, volume 0.4). Omit the object entirely to get all notifications.

Flag

Flag Description
--no-notify Disable all notifications and sounds for this run

Events

Event When
onComplete Agent finishes a full turn (agent_settled)
onError A tool result is flagged as an error (deduped per turn)
onQuestion Pi blocks on a user-facing prompt (ui_prompt_start) — e.g. ask_user_question

Why

Long-running agent tasks finish silently. A desktop notification when the work is done — or when something breaks — lets you context-switch away without polling.

License

MIT