osascript

Run AppleScript or JavaScript for Automation (JXA) from the command…

osascript

Run AppleScript or JavaScript for Automation (JXA) from the command line.

osascript -e '{{say "Hello world"}}'

osascript -e '{{say "Hello"}}' -e '{{say "world"}}'

osascript {{path/to/apple.scpt}}

osascript -e 'id of app "{{Application}}"'

osascript -l JavaScript -e '{{console.log("Hello world");}}'

osascript -l JavaScript {{path/to/script.js}}

Также может быть вам интересно:
AppleMacOS
← opensnoop pbcopy →