pi-notify-agent
Cross-platform desktop notifications and sounds for pi-coding-agent
Package details
Install pi-notify-agent from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-notify-agent- Package
pi-notify-agent- Version
0.1.2- Published
- Apr 17, 2026
- Downloads
- 358/mo · 26/wk
- Author
- alyuslabs
- License
- MIT
- Types
- extension
- Size
- 81.1 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
],
"image": "https://raw.githubusercontent.com/AlyusLabs/pi-notify-agent/main/assets/preview.png"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-notify-agent

Cross-platform desktop notifications + sound alerts for pi-coding-agent.
When a pi run takes longer than a configurable threshold, this package notifies you when the agent:
- finishes successfully
- stops with an error / provider failure / connection-like failure
Features
- Windows: native toast + system beep
- macOS: native notification via
osascript+ system beep - Linux:
notify-send+ sound fallback (canberra-gtk-play/paplaywhen available) - Terminal fallback: Kitty
OSC 99, otherwiseOSC 777, plus terminal bell when needed - Attention mode: emits
BELso supporting terminals can flash taskbar, tab, dock, or urgency state - Noise reduction: default threshold is 3000ms
- pi commands:
/notify-test,/notify-test error,/notify-status - CLI flags: configure threshold and on/off behavior without editing code
Install
From a local folder
pi install ./pi-notify-agent
From GitHub
pi install https://github.com/AlyusLabs/pi-notify-agent
From npm
pi install npm:pi-notify-agent
After installing, reload pi:
/reload
Quick test
/notify-test
/notify-test error
/notify-status
Default behavior
By default the package:
- waits until the run lasts at least 3000ms
- sends notifications for success
- sends notifications for error
- plays sound together with the notification
- emits BEL attention together with the notification
- ignores aborted runs
CLI flags
The extension registers these pi flags:
--notify-min-ms <number>--notify-success <on|off>--notify-error <on|off>--notify-sound <on|off>--notify-attention <on|off>
Examples
# Only notify for long runs (5 seconds)
pi --notify-min-ms 5000
# Disable success notifications
pi --notify-success off
# Keep desktop notifications but disable sound
pi --notify-sound off
# Keep notifications but disable terminal attention bell
pi --notify-attention off
# Only notify on errors
pi --notify-success off --notify-error on
Development
Run the extension directly without installing:
pi -e ./extensions/index.ts
Or load the package from its folder:
pi install .
Package structure
pi-notify-agent/
extensions/
index.ts
package.json
README.md
LICENSE
Publishing
1. Create a Git repo
git init
git add .
git commit -m "feat: initial pi notification package"
2. Push to GitHub
git remote add origin https://github.com/AlyusLabs/pi-notify-agent.git
git push -u origin main
Users can then install with:
pi install https://github.com/AlyusLabs/pi-notify-agent
3. Publish to npm
If the package name is already taken, rename the name field in package.json first.
npm login
npm publish --access public
Then users can install with:
pi install npm:pi-notify-agent
Taskbar flash / dock bounce / attention
The new notify-attention mode uses the terminal bell (BEL, \a). That is the most cross-platform way to request attention from a terminal window.
Whether this becomes a flashing taskbar icon, a bouncing dock icon, a tab badge, or just a beep depends on the terminal emulator settings.
Common setups:
- Windows Terminal: configure
bellStyleto includewindowand/ortaskbar - kitty: enable
window_alert_on_bell yes(and on macOS optionallymacos_dock_badge_on_bell yes) - xterm: enable urgent-on-bell behavior (
bellIsUrgent) - rxvt-unicode / urxvt: enable
urgentOnBell - iTerm2: enable bell/dock-bounce style behavior in profile settings or triggers
This is more portable than trying to directly manipulate the OS taskbar/dock from the extension.
Notes
- Linux desktop notifications require a GUI session and usually
notify-send. - Linux sound playback depends on what is installed on the machine.
- On headless / SSH-only environments the package falls back to terminal notifications / bell.
- Attention behavior is terminal-dependent;
BELis the portable trigger, but the visual effect depends on terminal config. - If you want different sounds for success vs error, add that in
extensions/index.ts.
License
MIT
