applescript
Installation
SKILL.md
AppleScript & JXA
Drive macOS apps from the command line via osascript. AppleScript and JXA both compile to OSA bytecode and run through the same engine — pick whichever syntax you prefer, but understand both. They have full access to the running user account; treat them like shell scripts that can also click buttons.
When to Use This Skill
- Driving a macOS GUI app that doesn't have a CLI (Mail, Notes, Calendar, Keynote, etc.)
- Reading or writing properties exposed by an app's scripting dictionary
- Triggering keystrokes or menu items via System Events
- Running shell commands inside an AppleScript block (
do shell script) - Wrapping AppleScript inside a Python/Node tool
Execution Methods
# AppleScript inline
osascript -e 'tell application "Finder" to activate'