First release in nine years. terminal-notifier is rebuilt on Apple's
UserNotifications framework because the old NSUserNotification API was
deprecated in macOS 11 and had been breaking progressively since.
Everyday use does not change. -message, -title, -subtitle, -group,
-remove, -list and the click actions all work the same way. Three options
could not be carried over.
Requires macOS 10.14 or higher. The binary is universal and runs natively
on Apple silicon and Intel. Stay on 2.0.0 for older systems.
Removed
| Option | Why |
|---|---|
-sender
| It worked by swizzling terminal-notifier's own bundle identifier. UserNotifications reads the real signed identity so there is nothing to override. It had been hanging or silently doing nothing for years. |
-appIcon
| Notification content has no icon property in the public API. The icon always comes from the sending bundle. Broken since Big Sur. |
-ignoreDnD
| It set a private flag. The public equivalent needs an entitlement Apple grants on request, which this build does not carry. |
All three are still accepted and print a warning, so existing scripts keep
running. They have no effect.
For a custom icon use make icon ICON=logo.png APP_NAME=my-tool, which builds
a copy of the app with your image.
Changed
-contentImagetakes local files only. Version 2 accepted remote URLs, the
attachment API does not.- Exit codes 2 to 6 were added to tell a bad argument from a permissions
problem from a timeout. Scripts testing for a non-zero status are unaffected.
Scripts testing for exactly1should be checked.
New
-action TITLEand-reply [PROMPT]bring back action buttons and inline
replies, removed in 2.0.0 because the old implementation used private API.
These wait for the user and print the answer on stdout, so a script can
branch on it.-timeout SECONDSbounds that wait.-diagnosereports why a notification is not appearing: authorization,
alert style, sounds, Focus, Scheduled Summary and whether Notification
Center is running.makebuild andmake doctor, so terminal-notifier can be built and
verified without installing Xcode.make doctorchecks every documented
option and prompts you for the ones only a person can judge.
Fixed
- Notifications sent without
-groupno longer replace each other. -removeremoves delivered notifications.-open,-executeand-activatefire reliably on click. A stale
background process no longer blocks them.-contentImageno longer deletes the image you pass it.- Modern sound names work.
- Tabs and newlines in a title or message no longer corrupt
-listoutput. -removeand-listno longer hang when stdin is an open pipe.- Failures are reported on stderr instead of failing silently.
- Running over SSH or from launchd exits with a diagnostic instead of hanging.
- No private API and no bundle identifier swizzling remain, so
terminal-notifier is App Store compatible again.
Ruby gem
gem install terminal-notifier requires Ruby 3.2 or newer. :action and
:reply return the answer. A timeout returns :_timeout rather than false,
so it can be told apart from a delivery failure.
Thanks to @billdaws, whose UserNotifications migration in #322 was the
starting point for this work.