Run and chain a macOS Shortcut from the command line alongside osascript

domain: support.apple.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Run a shortcut by name: shortcuts run "Combine Images" (quote or escape spaces)
  2. Pass file input with -i/--input-path, e.g. shortcuts run "Combine Images" -i ~/Desktop/photo.jpg
  3. Capture output with -o/--output-path
  4. Check a shortcut exists first with shortcuts list (use -f <FolderName> for custom folders)
  5. Open a shortcut for inspection with shortcuts view "Name" when troubleshooting
  6. Chain steps by scripting osascript -e '...' calls around the shortcuts run call, using its exit code for flow control

Known gotchas

Related routes

Run a macOS Shortcut non-interactively from a shell script, piping file input and capturing typed output
support.apple.com · 5 steps · unrated
Automate macOS applications using AppleScript via osascript from the command line or scripts
developer.apple.com · 5 steps · unrated
Run macOS Shortcuts automations from the command line or from scripts
support.apple.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans