Run a named Shortcut from the terminal: `shortcuts run "My Shortcut Name"` — this invokes the Shortcuts app to execute the named shortcut synchronously.
Pass text input to a shortcut: `echo 'input data' | shortcuts run "My Shortcut Name"` — the shortcut receives the piped text as its input.
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.
List all available shortcuts: `shortcuts list` — useful for discovering shortcut names exactly as they must be passed to `run`.
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
The `shortcuts` CLI only runs shortcuts stored in the current user's Shortcuts library. Shortcuts created by another user or distributed via iCloud links must be added to the local library before they can be invoked from the CLI.
Shortcuts that display UI, request permissions, or require interaction (e.g., a confirmation dialog) will block or fail in headless or remote SSH sessions where no user session is active — design automatable shortcuts to avoid interactive steps.
On macOS, Gatekeeper and TCC (Transparency, Consent, and Control) apply to shortcuts that access sensitive resources (contacts, photos, files outside the sandbox). A shortcut that works interactively may fail when run from a script if the Shortcuts app does not have the required permissions granted in System Preferences.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp