LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

terminal-notifier

Send macOS notifications from command line

TLDR

Send a basic notification
$ terminal-notifier -message "[Task completed]"
copy
Send with title and subtitle
$ terminal-notifier -title "[Build]" -subtitle "[Success]" -message "[All tests passed]"
copy
Send with a sound
$ terminal-notifier -message "[Done]" -sound default
copy
Send and open URL on click
$ terminal-notifier -message "[New issue]" -open "[https://github.com]"
copy
Send and activate an app on click
$ terminal-notifier -message "[Sync complete]" -activate [com.apple.AddressBook]
copy
Send from piped input
$ echo "[Build finished]" | terminal-notifier
copy
Group notifications (replace previous)
$ terminal-notifier -group "[build]" -message "[Completed]"
copy

SYNOPSIS

terminal-notifier [-title title] [-subtitle subtitle] [-message message] [-sound name] [-group id] [-activate bundleid] [-open url]

DESCRIPTION

terminal-notifier sends macOS User Notifications from the command line. It enables scripts and terminal commands to display native system notifications with customizable content, sounds, and click actions.Notifications can include titles, subtitles, message bodies, and sounds. Click actions can open URLs, activate applications, or execute callbacks. Group identifiers allow replacing previous notifications instead of stacking them.The tool is useful for alerting when long-running processes complete, such as builds, downloads, or scheduled tasks.

PARAMETERS

-message text

The notification message body (required unless piping)
-title text
The notification title (default: "Terminal")
-subtitle text
The notification subtitle
-sound name
Play a sound from /System/Library/Sounds; use "default" for system default
-group id
Group identifier; only one notification per group shown at a time
-activate bundleid
Activate specified app when notification is clicked
-open url
Open URL when notification is clicked
-remove id
Remove notification with specified group ID
-list id
List notifications with specified group ID

INSTALL

brew install terminal-notifier
copy
nix profile install nixpkgs#terminal-notifier
copy

CAVEATS

Sticky notifications (alerts) require manual configuration in System Settings > Notifications > terminal-notifier. Action buttons are not supported; use alerter for that functionality. Requires macOS 10.10 or higher.

HISTORY

terminal-notifier was created by Eloy Durán (julienXX) as an open-source tool to bring macOS notifications to command-line workflows. It became popular for integrating native notifications into development toolchains.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid