notifier-cli
v0.1.0
Published
System notification CLI
Readme
notifier-cli
Minimal system notification CLI.
The current macOS adapter defaults to displayAlert(...) via osascript JXA, and plays sounds through afplay. When both alert text and sound are present, sound starts first and the alert is delayed slightly so it lands with or just after the sound.
Usage
npm i -g notifier-clinotify -h # show help
notify # play default sound
notify --title "Build finished" --message "All tests passed"
notify -t "Build finished"
notify -m "Message only"
notify --title "Ping" --message "Check this" --sound Glass
notify --sound ./sound.aiffOptions
--titlealert title; if--messageis absent this becomes the main alert text--messagealert body; if--titleis absent this becomes the main alert text--soundbuilt-in sound name or path to a sound file--backendmacOS backend selection:alert,legacy, orstandard--debugprint debug information and executed commands to stderr--helpprint usage and all built-in sounds-tshort form of--title-mshort form of--message-sshort form of--sound-bshort form of--backend-dshort form of--debug-hshort form of--help
Behavior:
- If both
titleandmessageare omitted butsoundis provided, only the sound is played. - If
title,message, andsoundare all omitted, the default soundGlassis played. - If sound and alert text are both provided, sound starts first and the alert is shown shortly after.
Development
npm test