Run macOS Shortcuts automations from the command line or from scripts

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

Steps

  1. Run a named Shortcut from the terminal: `shortcuts run "My Shortcut Name"` — this invokes the Shortcuts app to execute the named shortcut synchronously.
  2. Pass text input to a shortcut: `echo 'input data' | shortcuts run "My Shortcut Name"` — the shortcut receives the piped text as its input.
  3. Capture the output of a shortcut: `output=$(shortcuts run "My Shortcut Name" --input-path /path/to/file --output-path /tmp/result.txt)` — use `--output-path` to write output to a file when the shortcut produces a file result.
  4. List all available shortcuts: `shortcuts list` — useful for discovering shortcut names exactly as they must be passed to `run`.
  5. Call shortcuts from other scripts or CI by invoking the `shortcuts` binary directly — it is available at `/usr/bin/shortcuts` on macOS Monterey and later.

Known gotchas

Related routes

Run and chain a macOS Shortcut from the command line alongside osascript
support.apple.com · 6 steps · unrated
Run a macOS Shortcut non-interactively from a shell script, piping file input and capturing typed output
support.apple.com · 5 steps · unrated
Run macOS Shortcuts by name from the command line and pass file input/output using the shortcuts CLI
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