← Catalog

@sanif/pi-sound-alerts

Sound alerts for Pi: hear when the agent finishes, asks a question, fails, or is cancelled. Nine original themes, from quiet beeps to meme-style gags, or your own MP3s.

Extension

Install

Install with PiG

pig install npm:@sanif/pi-sound-alerts

Install with Pi

pi install npm:@sanif/pi-sound-alerts
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 0.1.1 (README.md). PiG does not review it.

pi-sound-alerts

Sound alerts for Pi. Hear when the agent finishes, needs your answer, hits an error, or gets cancelled, with a different sound for each.

  • 9 built-in themes, from quiet beeps to Gags, with meme-style voice gags: a "faah", a "huh?", a sad trombone, and a "bruh".
  • Live theme picker: /sounds plays each theme as you scroll through it.
  • Your own sounds: point any state at your own MP3/WAV, borrow one sound from another theme, or mute it.
  • No audio files bundled: every theme sound is synthesized from code on first use. The package is about 80 KB.

Install

pi install npm:@sanif/pi-sound-alerts

From GitHub (follows the default branch):

pi install git:github.com/sanif/pi-sound-alerts

Then run /sounds to choose a theme.

States

StateWhen it plays
doneThe agent finished and Pi is waiting for your next prompt
questionThe agent opened a question or confirmation dialog during a run
errorThe run ended with an error
abortedYou cancelled the run (for example with Escape)

done plays only once Pi has fully settled, after any automatic retries, compaction, and queued follow-ups.

Themes

Themedonequestionerroraborted
minimal (default)Rising beepDouble pingFalling beepLow blip
zenBell chimeSinging bowlGongWood tick
arcadePower-upBlip blipGame overZap
retroStartup chordDingCritical thudClick
scifiWarp chirpComm beepRed alertPower down
synthwaveChord stabArpeggioDetuned fallFilter sweep
cartoonSlide whistleBoingBonk + slide downPop
hypeAir hornDun dun dunnnBoomRecord scratch
gagsFaahHuh?Sad tromboneBruh

Every sound is an original synthesis. Gags, Hype, and Retro are in the style of popular short-video gags and classic desktop sounds; they are not copies of any recording.

Commands

CommandWhat it does
/soundsOpen the theme picker (↑↓ theme, ←→ state, space replay)
/sounds theme <id>Switch theme directly
/sounds preview [theme] [state]Play a theme's sounds, or one state
/sounds set <state> <file>Use your own MP3/WAV for a state
/sounds set <state> theme:<id>Borrow that state's sound from another theme
/sounds set <state> offMute one state
/sounds reset [state|all]Go back to theme sounds
/sounds volume <0-100>Set the volume
/sounds on / /sounds offTurn alerts on or off
/sounds statusShow the current settings

Tab completion works for subcommands, themes, and states.

Mix and match

/sounds theme zen
/sounds set done ~/Music/faah.mp3
/sounds set error theme:hype
/sounds set question off

That plays your own clip when the agent finishes, the Hype "boom" on errors, nothing for questions, and the Zen wood tick on cancel.

Configuration

Settings live in ~/.pi/agent/pi-sound-alerts.json. /sounds writes this file for you, but you can also edit it by hand; changes apply on the next alert.

{
	"enabled": true,
	"theme": "minimal",
	"volume": 0.7,
	"modes": ["tui"],
	"sounds": {
		"done": "~/Music/faah.mp3",
		"error": "theme:hype",
		"question": false
	}
}
KeyDefaultMeaning
enabledtrueMaster switch
theme"minimal"Any theme id from the table above
volume0.7Playback volume, 0 to 1
modes["tui"]Pi modes that play sounds: tui, rpc, json, print
sounds{}Per-state override: a file path, "theme:<id>", or false to mute

File paths may start with ~/. Relative paths are resolved against ~/.pi/agent/. If a custom file goes missing, the theme sound plays instead and Pi shows a warning once.

By default only the interactive terminal UI plays sounds. Subagents and scripted runs use json or print mode, so they don't play sounds over your main session. Add "rpc" to modes if you drive Pi from an RPC client.

Set PI_SOUND_ALERTS=0 in the environment to silence one Pi process without changing the config.

Platforms

  • macOS: uses the built-in afplay.
  • Linux: uses the first available of pw-play, paplay, ffplay, mpv, or aplay (WAV only). For MP3 files, ffplay or mpv is preferred.

Rendered theme sounds are cached in ~/.pi/agent/cache/pi-sound-alerts/.

Development

bun install
bun run verify   # typecheck, tests, package dry run

License

MIT