[osascript] Show a macOS notification from the command line

Created on November 30, 2026

You can run AppleScript's display notification command from a macOS terminal with osascript -e. This example shows the message Hello, world! with the title Test Notification.

osascript -e 'display notification "Hello, world!" with title "Test Notification"'

Notification settings can affect whether the notification appears.

Reference

osascript mac