macOS

osascript

CautionRun AppleScript

osascript -e '<AppleScript>'

Runs AppleScript from the shell — notifications, app control, dialogs; the GUI automation bridge.

Examples

  • osascript -e 'display notification "完了" with title "Job"'Show a notification

Syntax

osascript [-e script] [file.scpt]

Before you run it

App-control scripts affect their targets.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store