A modern Swift CLI tool for sending macOS User Notifications from the command line. Inspired by the excellent terminal-notifier project, this Swift 6 implementation maintains compatibility with most commands while leveraging modern macOS frameworks.
- Send rich notifications with title, subtitle, and message
- Custom notification sounds
- App activation and URL opening
- Notification removal and listing
- Native Swift implementation using UserNotifications framework
- Universal binary support (Apple Silicon)
- macOS 13.0 (Ventura) or later
- Swift 6.0+ (for building from source)
brew install notifycurl -fsSL https://raw.githubusercontent.com/florianbx/notify/main/install.sh --install | bashgit clone https://github.com/florianbx/notify.git
cd notify
make installnotify --message "Hello World!"notify --title "Build Complete" --subtitle "MyApp" --message "The build finished successfully"notify --message "Task completed" --sound "Glass"System sounds available on all macOS systems:
Basso,Blow,Bottle,Frog,Funk,Glass,Hero,Morse,Ping,Pop,Purr,Sosumi,Submarine,Tink
Examples:
notify --message "Build finished!" --sound "Hero"
notify --message "Error occurred" --sound "Basso"
notify --message "New message" --sound "Ping"Note: Additional sounds may be available depending on your macOS version. All system sounds are located in
/System/Library/Sounds/.
notify --message "Check this out!" --open "https://github.com"notify --message "Ready for review" --activate "com.apple.Safari"notify listnotify remove --allnotify remove --group "MyGroup"Note: For backward compatibility with terminal-notifier, the legacy flag syntax (
notify --listandnotify --remove GROUP) is also supported when using thesendcommand, but the subcommand syntax shown above is preferred.
make buildmake testmake dev-installmake releaseThis tool is packaged as a macOS app bundle (.app) to comply with the UserNotifications framework requirements. The CLI binary is located at:
notify.app/Contents/MacOS/notify
The Homebrew formula creates a symlink from /usr/local/bin/notify to the binary inside the app bundle.
This tool is inspired by and compatible with most terminal-notifier commands. If you're coming from terminal-notifier, most of your existing scripts should work with minimal changes - just replace terminal-notifier with notify.
- Binary name:
terminal-notifierβnotify - Requires macOS 13.0+ (vs 10.10+ for terminal-notifier)
- Built with modern Swift and UserNotifications framework
- Some advanced options may have slight differences
This project is inspired by the excellent terminal-notifier by Julien Blanchard. Many thanks for creating such a useful tool that has served the macOS community for years!
MIT License