
“Finally, macOS Monterey also includes a command-line tool that can list shortcuts and run them by name.

In AppleScript, you can accomplish this by telling the “Shortcuts Events” process to run a shortcut by name”: By communicating with the “Shortcuts Events” process, your app can get a list of shortcuts that the user has set up, as well as start running one. “If you develop an app or a script that would benefit from the ability to run Shortcuts, you should use the Scripting interface. “There’s a Shortcuts command-line tool which lets you list and run Shortcuts in your Shell Scripts or command-line tools”. But in context, they’re talking speficially about replacing Automator. Taken in isolation it’s a scary implication the other technologies are destined for the bin. “Shortcuts is the future of Mac automation”. “Shortcuts has full support for AppleScripts and Shell Scripting”.

If you need to re-sign a Shortcut, you can use the new Shortcuts command-line tool”. (…) “a new mode for sharing Shortcuts privately” (…) “Shortcuts files are signed with the identity of the person who sent them. However, it’s unclear if we’ll need a ($99/year) Developer Account to distribute them in useful form, since they mention signing: “Shortcuts files are notarized by Apple to make sure they’re safe”. For M1 Macs, that may open a window to distribute everything needed to control iOS apps from Alfred. Which means we may be able to distribute Shortcuts as complements to Workflows. (…) “This means that you can distribute your own Shortcuts on your website or in your app”. “We also have a new file format that lets you distribute Shortcuts as files“. “By the way, if your app integrates with file providers, these new Files actions will automatically work with the files that your app provides”.

“We also added two new automation types for Focus and Sound Recognition”. On June 8 there was a session going more in-depth into Shortcuts. The Shortcuts command-line tool doesn’t support signing.
