Earlier today on Six Colors, Jason Snell wrote about running Shortcuts from the command line:
I was reminded by Simon Støvring, maker of the excellent Mac and iOS utility Data Jar (which is a persistent data store that’s accessible via Shortcuts), that people may not be aware of just how well integrated Shortcuts is into macOS.
Jason has put his finger on something I think has gone unnoticed by a lot of users. The deep integration of Shortcuts with macOS is its superpower, especially because it’s bidirectional. You can run your shortcuts from the command line and run command line scripts in your shortcuts. The same goes for AppleScript.
Add to that the ability to run shortcuts via AppleScript files, as applets, or with third-party apps, and there’s an incredible amount of room for creativity in bringing tools built into macOS and third-party automation apps together in new ways. It’s what led me to build the utility shortcuts I wrote about on MacStories and Club MacStories today and Federico to explore new ways to pass input into shortcuts earlier this week.
Be sure to check out Jason’s story for examples of the way shortcuts can be run from the command line and the results passed to other apps or used by macOS in various ways.