Skip to content

Show a Notification Center alert from a shell script or AppleScript — by grg on Ask Different

intermediateforumCC BY-SA (Stack Exchange; version depends on post date)

AppleScript's built-in display notification command shows a native notification without any extra apps. From a shell script you can call it through osascript, which is handy when a long job finishes.

Quick steps

  1. AppleScript: display notification "Done" with title "Backup"
  2. From the shell: osascript -e 'display notification "Done" with title "Backup"'

Paraphrased from the source. Menus can differ by version, so check the original for full details.

Read the full thread on apple.stackexchange.com

Source: Show a Notification Center alert from a shell script or AppleScript by grg on Ask Different. Licence: CC BY-SA (Stack Exchange; version depends on post date).

Source reviewed
2026-11-02
Link checked
Not yet
Tested hands-on
Not by Oddbyte.Me

applescriptosascriptnotificationsautomation

More in Community Answers (Stack Exchange)