osascript
Osascript is a command-line utility in macOS that runs scripts written for the system’s scripting facilities, including AppleScript and JavaScript for Automation (JXA). It acts as a bridge between the shell and applications or system components that expose Apple events, enabling automation and control of apps, windows, files, and other resources.
Osascript can execute scripts from files or inline code. You can pass a script file as an
Common usage includes automating routine tasks in shell scripts, batch workflows, or testing. Examples include telling
Osascript is located at /usr/bin/osascript on macOS and is part of the Open Scripting Architecture. It is