Notification Proxy is a command-line tool to send macOS user notifications. It uses the app icon from keychain by faking its bundle identifier. Clicking on a notification opens keychain via apple script.
# Download
git clone http://github.com/frankmorgner/NotificationProxy.git
# Build
xcodebuild -target NotificationProxy -configuration Release -project NotificationProxy/NotificationProxy.xcodeproj install DSTROOT=${PWD}
# Execute
title="Test Notification"
open -a "${PWD}/Applications/NotificationProxy.app" --args "${title}" "${subtitle}" "${text}" "${image}" "${sound}" "${group}"
All arguments are optional; supply empty strings if you wish to not initialize an item.
- title
 - Specifies the title of the notification.
 - subtitle
 - Specifies the subtitle of the notification.
 - text
 - The body text of the notification.
 - image
 - Path to the image file shown in the content of the notification.
 - sound
 - Specifies the name of the sound to play when the notification is delivered. Valid names can be found in the sound preferences. Use "NSUserNotificationDefaultSoundName" for the system's default sound.
 - group
 - Notifications with a group string will remove older notifications with the same group string from the notification center.