Manage macOS shortcuts.

      shortcuts list [-f Folder] [--folders]

      shortcuts run "Shortcut Name" [-i InputFile] [-o OutputFile]

      shortcuts view "Shortcut Name"

      shortcuts sign --mode {people-who-know-me | Anyone}

   Shortcut Name  The name of the shortcut to view/run.
                  If the name contains spaces, either surrround with quotes: "Combine Images"
                  or escape the space with a backslash:  Combine\ Images

   -f             List the shortcuts in a custom folder.
                  You cannot list the contents of generated folders such as “Quick Actions” or “Menu Bar”.

   --input-path   An input file (or set of files) to be processed by the shortcut. Wildcards accepted.

   --output-path  Write the output to a file.

You can sign a shortcut you previously exported using shortcuts sign.
When you sign a shortcut, Apple receives a copy for validation, to prevent unauthorised tampering when you share it.

Shortcut signing has two modes:

The shortcuts command will exit 0 on a successful run or 1 on error.


List the shortcuts in a custom folder with the name “Music”:

$ shortcuts list -f Music

List all your folders instead of the shortcuts:

$ shortcuts list --folders

Open a shortcut in the GUI editor. This can be helpful when troubleshooting an errant shortcut:

$ shortcuts view "My shortcut"

Run the shortcut "Combine Images":

$ shortcuts run "Combine Images"

Run the “Combine Images” shortcut and pass all .jpg files on the Desktop:

$ shortcuts run "Combine Images" -i ~/Desktop/*.jpg

Run the “Combine Images” shortcut and combine all the images on the Desktop to a PNG file:

$ shortcuts run "Combine Images" -i ~/Desktop/*.jpg -o ~/Desktop/combined.png

Sign a shortcut named “ss64”:

$ shortcuts sign --mode people-who-know-me --input "ss64.shortcut" --output "ss64 signed.shortcut"

“It’s not a self-driving car unless you can sleep in it” ~ Alex Roy

Related macOS commands

Shortcuts User Guide - Apple.
Sharing shortcuts through iCloud or as a file.
ln - Make links between files (hard links, symbolic links).

Copyright © 1999-2024
Some rights reserved