← Catalog

@bukutsu/pi-ping

Minimal, focus-aware desktop notifications for the Pi coding agent. Alerts for finished runs in an unfocused terminal, customizable messages, and unread tab markers. Unknown focus falls back to alerts.

Extension

Install

Install with PiG

pig install npm:@bukutsu/pi-ping

Install with Pi

pi install npm:@bukutsu/pi-ping
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 1.3.6 (README.md). PiG does not review it.

pi-ping

Get a desktop notification when Pi finishes a run while you're away from the terminal. The tab title also gets a [!] marker until you come back.

Works in interactive TUI sessions only.

Install

pi install npm:@bukutsu/pi-ping

Then restart Pi or run /reload.

When it pings

  • The run took 10s or more, used a tool, or ended with an error.
  • You weren't looking for at least 3s.
  • The run wasn't cancelled.

If pi-ping can't tell whether you're looking, it pings anyway.

Commands

  • /notify shows focus state and whether the last run would ping.
  • /notify test sends a test notification.

Settings

Set these before starting Pi.

VariableDefault
PI_PING_TITLEPi: {session} or Pi: {dir}
PI_PING_BODYDone in {duration}
PI_PING_ERROR_TITLEsame as title
PI_PING_ERROR_BODYStopped after {duration}
PI_PING_MARKER[!] (empty to turn off)
PI_PING_MIN_WORK_MS10000
PI_PING_MIN_AWAY_MS3000
PI_PING_PROTOCOLauto (osc9, osc99, osc777)
PI_PING_DESKTOP_FALLBACKtrue (Linux notify-send)

Titles and bodies can use these placeholders:

{duration} {duration_ms} {status} {stop_reason} {error_message} {tools} {errors} {turns} {dir} {cwd} {session} {model} {provider} {thinking} {input_tokens} {output_tokens} {cache_read_tokens} {cache_write_tokens} {tokens} {cost}

Example:

export PI_PING_BODY="Done in {duration}, {tokens} tokens, USD {cost}"

{error_message} can contain provider or request details, so only add it if you're fine seeing that in notifications.

Terminals

TerminalProtocol
KittyOSC 99
Ghostty, iTerm2, WezTerm, WarpOSC 9
OthersOSC 777, plus notify-send on Linux

Under tmux, turn on passthrough so notifications reach your terminal.

Development

bun install
bun run typecheck
bun run test