Batch Shortcuts Signer (iOS) Shortcut


Automate shortcuts sign (remotely!) to export shareable .shortcut files by folder.

See the macOS version of this shortcut to export signed .shortcut files locally.

This is a modification of Federico Viticci’s “Shortcut Injector,,” about which you can read more details in “Creating, Modifying, and Signing Shortcuts on macOS.” It is identical to the version I published for macOS with additional considerations for performing the signatures remotely over SSH. At install, you will be prompted to specify:

  1. The address of the host Mac on which signatures will be performed.
  2. The username of the account on said host Mac from which you will be signing.
  3. A port (other than 22) to use for the SSH connection.
  4. The password of said user account on the host Mac.

You will also need to explicitly set two directories: one for the pre-signed, post-export files saved only because they cannot otherwise be passed to the export tool (most will want to delete these, I assume,) and another to be the final destination of the signed output files. The first is just a Folder action set to Ask Each Time and the second is a simple Text action that represents a pointer originating from your home folder (~).

shortcuts sign -m anyone -i "Pre-Signed Export Path" -o "Signed.shortcut"

I should note that by default, the shortcut comes with a Text Case action designed to transform the input shortcut’s original filename into camel case, mostly because I am 100% fed up with URL-encoded links’ tendency to illicit inexplicable and inconsistent behavior from iOS apps, at least.

That said, please note that said Text Case action is 100% optional. Substitute a Rename File action if you’ d like.

After the Repeat With Each cycle completes (and the files are signed,) an additional remote command is run:

ls -1 -d "$PWD/Your specified directory/"*

...and the result - an unformatted list of the full file path for every signed shortcut in the directory - is copied to the clipboard and finally shown via Quick Look.

Batch Shortcuts Signer-iOS
Batch Shortcuts Signer-iOS

You can find the source files - including an HTML overview - in the /shortcuts directory of my iOS GitHub Repository.

Video Demo

For good measure, here’s the result of shortcuts help sign:

OVERVIEW: Sign a shortcut file.

You can use this command to sign a shortcut file. It also supports signing a shortcut in the old format.

USAGE: shortcuts sign [--mode <mode>] --input <input> --output <output>
shortcuts help --verbose
  -m, --mode <mode>       The signing mode. (default: people-who-know-me)
  -i, --input <input>     The shortcut file to sign. 
  -o, --output <output>   Output path for the signed shortcut file. 
  -h, --help              Show help information.