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 notify
curl -fsSL https://raw.githubusercontent.com/florianbx/notify/main/install.sh --install | bash
git clone https://github.com/florianbx/notify.git
cd notify
make install
notify --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 list
notify remove --all
notify remove --group "MyGroup"
Note: For backward compatibility with terminal-notifier, the legacy flag syntax (
notify --list
andnotify --remove GROUP
) is also supported when using thesend
command, but the subcommand syntax shown above is preferred.
make build
make test
make dev-install
make release
This 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