@smoose/pi-notify
Native terminal notifications for Pi when the agent is ready for input.
Package details
Install @smoose/pi-notify from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@smoose/pi-notify- Package
@smoose/pi-notify- Version
0.1.1- Published
- Jun 2, 2026
- Downloads
- not available
- Author
- smoose
- License
- MIT
- Types
- extension
- Size
- 10.1 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-notify
Pi extension that sends a native terminal notification when the agent finishes and waits for input.
Install
pi install npm:@smoose/pi-notify
Configuration
PI_NOTIFY_TITLE: notification title template, defaultπ - {project}PI_NOTIFY_BODY: notification body template, default{message}PI_NOTIFY_MESSAGE_SOURCE:userorassistant, defaultassistantPI_NOTIFY_MESSAGE_MAX: max message characters before ellipsis, default80, max500PI_NOTIFY_SOUND_CMD: optional shell command run after notification
Kitty uses OSC 99 with o=always. Non-Kitty terminals fall back to macOS AppleScript notifications via osascript. Inside tmux, the active tmux client is checked so stale KITTY_WINDOW_ID values do not force Kitty mode.
When running Kitty inside tmux, enable passthrough:
set -g allow-passthrough all
Template variables:
{project}: current directory name{cwd}: current working directory{model}: active model asprovider/id{model_short}: active model id only{message}: selected current-turn message based onPI_NOTIFY_MESSAGE_SOURCE{user_message}: current-turn user message, truncated{assistant_message}: latest current-turn assistant text, truncated{duration}: agent run duration, such as4.2s{duration_ms}: agent run duration in milliseconds
Example:
PI_NOTIFY_TITLE="π - {project}" PI_NOTIFY_BODY="{message}" pi