macos-safari
Installation
SKILL.md
macOS Safari Automation
Control Safari on macOS using AppleScript via the osascript command.
Prerequisites
- macOS with Safari installed
- Automation permission granted to your terminal (System Settings > Privacy & Security > Automation)
Opening URLs
Open a URL in the current tab
osascript -e 'tell application "Safari" to set URL of current tab of front window to "https://example.com"'
Open a URL in a new tab
osascript -e 'tell application "Safari" to tell front window to set current tab to (make new tab with properties {URL:"https://example.com"})'
Related skills