Tuesday, June 8, 2021

Shortcuts for Mac


Shortcuts is coming to macOS, and your apps are a key part of that process. Discover how you can elevate the capabilities of your app by exposing those features as Shortcuts actions. We’ll show you how to build actions for your macOS apps built with Catalyst or AppKit, deploy actions across platforms, publish and share shortcuts, and enable your app to run shortcuts from other apps. We’ll also take you through how Shortcuts fits in with existing Mac automation technologies like Automator and AppleScript.

Mitchel Broussard:

Shortcuts will be integrated throughout macOS Monterey, in the menu bar, Finder, Spotlight, and even with Siri. Apple also noted that users will be able to import existing Automator workflows into Shortcuts, and Automator will remain supported.

Stephen Hackett:

Developers of traditional Mac apps — even those built with AppKit — can add Shortcuts support to their projects via Intents, just like support is added in iOS apps.

That might seem surprising, but considering that Apple pitched this as the start of a longer transition, getting traditional Mac apps on board is going to be required if Apple wants to discontinue Automator somewhere down the line.


Moving workflows from Automator to Shortcuts couldn’t be easier. Drag and drop your .workflow file onto Shortcuts, and it will be transformed into a Shortcut automatically.

This seems to be because Apple has re-implemented its own built-in Automator actions in Shortcuts. Third-party Automator actions don’t work in Shortcuts.

Maynard Handley:

Does it have debugging?

Does it have logging?

Does it have the ability to cut and paste SECTIONS of a shortcut?

To duplicate then modify a shortcut?

As far as I can tell, the answers to these questions are No, except that you can duplicate shortcuts and then edit them. I wasn’t able to play around with Shortcuts much because it kept crashing in SwiftUI (which it’s implemented using). I was curious to try the new SwiftUI focus and keyboard navigation features, but alas they seem to be a work in progress.


Update (2021-06-13): Jeff Nadeau:


Mert Dumenci:

Because I’m so excited about this (and Shortcuts for Mac in general), another fun tip: try chaining shortcut runs!

shortcuts run "Resize" —input-path photo.jpg | shortcuts run "Resize" | shortcuts run "Resize" —output-path resized.jpg

Update (2021-06-29): Dr. Drang:

All in all, this looks like everything I wanted in Mac Shortcuts. As I said in the post two years ago, the ability to run every kind of automation from every other kind of automation is key to making a fluid system, where you can use each tool for what it does best. Also, it means that third-party automation tools like Keyboard Maestro, which has a good AppleScript dictionary for running its macros, will fit in well with the new environment even before they incorporate Intents that are directly accessible from Shortcuts.

There is one oddity left unresolved. The emphasis Apple put on being able to run shell scripts from Shortcuts and vice versa seems to be at odds with its declaration with the release of Catalina that built-in scripting languages are being deprecated[…]


Update (2021-09-07): Jason Shell:

On the Mac side it is also really, really rough, even on the latest beta. I got a crash within 30 seconds and there’s also a lot that doesn’t quite work right...

Steve Troughton-Smith:

While I’m on the topic of macOS 12 & SwiftUI frustration, there is… a lot of work… the Shortcuts app still needs, to be ready to ship in a macOS 12 RC. It feels like Shortcuts is really struggling with SwiftUI too, which makes me feel a little better about my apps

Update (2021-10-15): John Voorhees:

One of the worst UI elements in Shortcuts for Mac is the image picker. It opens by default as a single column list of thumbnails and every time you resize it, all the thumbnails reload and the M1 iMac beachballs. Window resizing arrows disappear at times too. Super frustrating 😭

Steve Troughton-Smith:

We’re only a couple weeks away from a macOS 12 RC at most, so now is the time for tough love. The general OS reliability is pretty mixed, and Shortcuts is dangerously close to torpedoing its first outing on the Mac and poisoning the well on Apple’s efforts to modernize automation

It would probably be wise to launch Shortcuts with a ‘Beta’ label; it needs a free pass to evolve for a while

Ezekiel Elin:

Cannot control Low Power Mode with Shortcuts in Monterey 🙃

Josh Ginter:

Here’s how to run a shortcut from the menu bar in Shortcuts for macOS Monterey.

Howard Oakley:

As an introduction to future articles about Shortcuts and how to get more out of it, this article provides an overview of the last 28 years of scripting the Mac.


Four months after WWDC, Apple has released precious little documentation for developers; indeed, what it has produced in Xcode to date states that the interface required to support Shortcuts isn’t generally available in macOS 12, but is confined to Catalyst apps, which contradicts presentations given at WWDC, which stated clearly that Shortcuts was supported in AppKit, which is generally accessible. As a result, for most third-party developers Shortcuts support is unlikely to be feasible with the release of Monterey, and the only support is going to come in macOS itself and Apple’s own apps, much of which is still based on Shortcuts in iOS and iPadOS.


Update (2021-10-28): Stephen Hackett:

I am loving having Shortcuts on my Mac, but I really do wonder if using SwiftUI to build it was the right call. A lot of the controls are finicky, but this pop-up is just about the saddest looking thing I’ve ever encountered in a first-party Mac app


Update (2021-12-03): David Sparks:

I worry that folks eager to try Shortcuts for Mac are going to get frustrated when the creation process fails them. (For example, I spent 10 minutes fighting with Shortcuts this morning to set a variable.) Once new users get a Shortcut built, there is no guaranty it will perform correctly given the current state of things. To make this worse, there is very little in the way of error reporting. A lot of times the Shortcut will fail with no feedback whatsoever to the user so you don’t know if you made a mistake in constructing it, or if the feature you called is just broken.

Update (2021-12-17): Nicholas Riley:

Wow, people were not kidding about Shortcuts on Mac. Could not find a way to copy and paste actions and eventually realized it was copying/pasting the shortcuts (in the window behind) instead. Back to iPad…

Update (2022-02-11): Dr. Drang:

Upgraded to Monterey over the weekend, and today is my first day looking at Shortcuts on a Mac. You people have been far too generous. So much normal Mac behavior either doesn’t work or is inconsistent. An absolute piece of shit. And you say it was worse a few months ago?

John C. Welch:

I can create an event on my Exchange Calendar in the “Add New Event” shortcut, or any calendar Calendars can see, (which is something you can’t do via AppleScript, and has been that way since iCal first supported Exchange. Can’t imagine why I am so cynical about Apple’s automation “commitment”), but you can’t do that for Contacts. […] The Finder shortcuts are still so basic as to be not useful. You can’t just make a new file. You can’t make a new folder. I don’t know why Apple bothered with it if they’re going to limit it that much.

Update (2022-06-03): Peter N Lewis:

Sigh, so the shortcuts utility does not match names in a way that is composed/decomposed agnostic, and NSTask actively decomposes all arguments (!?!?) with fileSystemRepresentation, which makes it quite hard to use NSTask to run shortcuts in a way that is unicode-safe.

Update (2023-04-21): John Gruber:

Shortcuts on Mac continues to look like it was written by developers who have never used a Mac.

5 Comments RSS · Twitter

RIP AppleScript

Old Unix Geek

Cynical thought: Letting previous solutions to problems die through lack of maintenance, and Sherlocking are two easy ways to have "innovations" to show at WWDC.

IMO Shortcuts fulfills the promise of Automator. I'm glad to see it's been chosen as the path forward on the Mac. (Particularly as it can run Applescripts & shell scripts.)

Shortcuts has become incredibly useful to me on the iPhone, and I'm looking forward to taking advantage of it on the Mac.

Stupid question: does the shortcut tool work in a headless session?

10 out of 1 zillion people will use shortcuts and half of those 10 zillion will disregard it when it fails to do what they want on the first try. Kind of a joke they spent even $100 developing something that fewer than 100 people in the US will use.

Leave a Comment