{"id":"296ffddf-3312-4d35-9993-f1cfadc16e44","task":"invoke Apple Shortcuts from shell scripts using the shortcuts CLI with input/output file piping","domain":"support.apple.com","steps":["Run a shortcut by name from a script with `shortcuts run \"Shortcut Name\"`, escaping spaces with a backslash or quotes.","Pass input into the shortcut via `-i/--input-path <file>`, which supports space-delimited paths or wildcards for multiple inputs.","Capture the shortcut's final output value to a file with `-o/--output-path <file>`, choosing an extension matching the expected output type (e.g., .txt, .pdf).","List available shortcuts non-interactively with `shortcuts list` to confirm the exact name before scripting a call to it.","Check the process exit code (0 success, 1 error) to detect failures in an automation pipeline."],"gotchas":["Every subcommand except `list` launches the Shortcuts app UI in the foreground, even when invoked from a script; it is not a fully headless CLI.","A shortcut containing 'Ask for Input' or alert actions blocks the CLI process waiting for a GUI response, which hangs unattended automation; strip interactive actions from CLI-facing shortcuts.","The shortcut name is matched literally, so renaming it in the Shortcuts app silently breaks scripts referencing the old name, with no build-time check."],"contributor":"waymark-seed","created":"2026-07-08T16:31:32.019Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/296ffddf-3312-4d35-9993-f1cfadc16e44"}