Welcome to this documentation page for Bypass - an Apple Shortcuts workflow for Alfred, the popular launcher and automation application for macOS.
Bypass is an Alfred workflow I created for working with the Apple Shortcuts app on the Mac. It provides a variety of ways in which to interact with Shortcuts and since introducing it in November 2021, I have continued to develop it - to the point where it deserved it’s own documentation page.
Its primary purpose is to allow you to launch your Shortcuts workflows (known as shortcuts) from Alfred, potentially even passing in content to be processed. Bypass contains a number of keyword, external trigger and universal action triggers to enable this. However, I have also added additional functionality to help you query shortcuts and build out new ways to use them.
Prerequisites:
Bypass offers a breadth of functionality, and this has been broken down into a number of sections.
The ability to run a shortcut from Alfred was the key driver when this Alfred workflow was first created.
Keyword Trigger: scrun
or sc
Allows you to select a shortcut from all available shortcuts and run it. The shortcut does not receive any input.
Keyword Trigger: scruni
Allows you to select a shortcut from all available shortcuts and run it. You are also prompted for text to pass as input to the shortcut.
Keyword Trigger: scrunf
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder and run it. The shortcut does not receive any input.
Keyword Trigger: scrunfi
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder, then capture some text input, and run the shortcut with the text as input to be processed by the shortcut.
External Trigger: scrun
Allows you to specify a shortcut by name (passed in as the “{query}”), and run it. The shortcut does not receive any input.
External Trigger: scruni
Allows you to run a shortcut with text input by passing in the input as {query}
, and setting the shortcut name via the variable shortcut2run
.
Universal Action Trigger: Send to a shortcut
Sends selected text or URL to a shortcut as input to be processed. A shortcut is selected from all available shortcuts, and the content is passed to the shortcut as input to be processed.
Universal Action Trigger: Send file to a shortcut
Sends selected file to a shortcut as input to be processed. A shortcut is selected from all available shortcuts, and the content is passed to the shortcut as input to be processed.
As well as running shortcuts, Bypass also allows you to quickly access shortcuts for editing.
Keyword Trigger: scedit
Allows you to select a shortcut from all available shortcuts and open it for editing.
Keyword Trigger: sceditf
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder and open it for editing.
External Trigger: scedit
Allows you to specify a shortcut by name (passed in as the “{query}”) and open it for editing.
Bypass allows you to query the system about the shortcuts and structures that are available.
Keyword Trigger: sccopy
External Trigger: sccopy
Copies an alphabetically sorted list of all shortcut names to the system clipboard.
Keyword Trigger: scfcopy
External Trigger: scfcopy
Copies an alphabetically sorted list of all Shortcuts folder names to the system clipboard.
Keyword Trigger: scinfo
External Trigger: scinfo
Copies a set of Shortcuts information to the system clipboard. This includes alphabetical listings of folders, shortcuts within folders, shortcuts not in folders, and counts of shortcuts within folders, no-folders and total.
Bypass not only helps you interact directly with Shortcuts, but it also supports you when you are creating ways to run shortcuts from other locations, through URL calls, shell commands, and AppleScript.
Keyword Trigger: scurl
Allows you to select a shortcut from all available shortcuts and copy the URL to run it to the system clipboard. The shortcut does not receive any input.
Keyword Trigger: scurli
Allows you to select a shortcut from all available shortcuts and copy the URL to run it to the system clipboard. You are also prompted for text to pass as input to the shortcut that is then included in the URL.
Keyword Trigger: scurlf
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder and copy the URL to run it to the system clipboard. The shortcut does not receive any input.
Keyword Trigger: scurlfi
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder, then capture some text input, and copy the URL to run the shortcut with the text as input to be processed by the shortcut.
External Trigger: scurl
Allows you to specify a shortcut by name (passed in as the “{query}”), and copy the URL to run it. The shortcut does not receive any input.
External Trigger: scurli
Allows you to copy the URL to run a shortcut with text input by passing in the input as {query}
, and setting the shortcut name via the variable shortcut2run
.
Keyword Trigger: scsh
Allows you to select a shortcut from all available shortcuts and copy the shell command to run it to the system clipboard. The shortcut does not receive any input.
Keyword Trigger: scshi
Allows you to select a shortcut from all available shortcuts and copy the shell command to run it to the system clipboard. You are also prompted for text to pass as input to the shortcut that is then included in the command.
Keyword Trigger: scshf
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder and copy the shell command to run it to the system clipboard. The shortcut does not receive any input.
Keyword Trigger: scshfi
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder, then capture some text input, and copy the shell command to run the shortcut with the text as input to be processed by the shortcut.
External Trigger: scsh
Allows you to specify a shortcut by name (passed in as the “{query}”), and copy the shell command to run it. The shortcut does not receive any input.
External Trigger: scshi
Allows you to copy the shell command to run a shortcut with text input by passing in the input as {query}
, and setting the shortcut name via the variable shortcut2run
.
Keyword Trigger: scas
Allows you to select a shortcut from all available shortcuts and copy the AppleScript code to run it to the system clipboard. The shortcut does not receive any input.
Keyword Trigger: scasi
Allows you to select a shortcut from all available shortcuts and copy the AppleScript code to run it to the system clipboard. You are also prompted for text to pass as input to the shortcut that is then included in the code.
Keyword Trigger: scasf
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder and copy the AppleScript code to run it to the system clipboard. The shortcut does not receive any input.
Keyword Trigger: scasfi
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder, then capture some text input, and copy the AppleScript code to run the shortcut with the text as input to be processed by the shortcut.
External Trigger: scas
Allows you to specify a shortcut by name (passed in as the “{query}”), and copy the AppleScript code to run it. The shortcut does not receive any input.
External Trigger: scasi
Allows you to copy the AppleScript code to run a shortcut with text input by passing in the input as {query}
, and setting the shortcut name via the variable shortcut2run
.
Snippet Trigger: scurl+
Allows you to select a shortcut from all available shortcuts and insert the URL to run it at the current cursor position. The shortcut does not receive any input.
Snippet Trigger: scurli+
Allows you to select a shortcut from all available shortcuts and insert the URL to run it at the current cursor position. You are also prompted for text to pass as input to the shortcut that is then included in the URL.
Snippet Trigger: scurlf+
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder and insert the URL to run it at the current cursor position. The shortcut does not receive any input.
Snippet Trigger: scurlfi+
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder, then capture some text input, and insert the URL to run it at the current cursor position with the text as input to be processed by the shortcut.
External Trigger: scurlpaste
Allows you to specify a shortcut by name (passed in as the “{query}”), and insert the URL to run it at the current cursor position. The shortcut does not receive any input.
External Trigger: scurlipaste
Allows you to insert the URL to run it at the current cursor position to run a shortcut with text input by passing in the input as {query}
, and setting the shortcut name via the variable shortcut2run
.
Snippet Trigger: scsh+
Allows you to select a shortcut from all available shortcuts and insert the shell command to run it at the current cursor position. The shortcut does not receive any input.
Snippet Trigger: scshi+
Allows you to select a shortcut from all available shortcuts and insert the shell command to run it at the current cursor position. You are also prompted for text to pass as input to the shortcut that is then included in the command.
Snippet Trigger: scshf+
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder and insert the shell command to run it at the current cursor position to run it to the system clipboard. The shortcut does not receive any input.
Snippet Trigger: scshfi+
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder, then capture some text input, and insert the shell command to run it at the current cursor position to run the shortcut with the text as input to be processed by the shortcut.
External Trigger: scshpaste
Allows you to specify a shortcut by name (passed in as the “{query}”), and insert the shell command to run it at the current cursor position to run it. The shortcut does not receive any input.
External Trigger: scshipaste
Allows you to insert the shell command to run it at the current cursor position to run a shortcut with text input by passing in the input as {query}
, and setting the shortcut name via the variable shortcut2run
.
Snippet Trigger: scas+
Allows you to select a shortcut from all available shortcuts and insert the AppleScript code to run it at the current cursor position to run it to the system clipboard. The shortcut does not receive any input.
Snippet Trigger: scasi+
Allows you to select a shortcut from all available shortcuts and insert the AppleScript code to run it at the current cursor position to run it to the system clipboard. You are also prompted for text to pass as input to the shortcut that is then included in the code.
Snippet Trigger: scasf+
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder and insert the AppleScript code to run it at the current cursor position to run it to the system clipboard. The shortcut does not receive any input.
Snippet Trigger: scasfi+
Allows you to select a shortcut folder from all available Shortcuts folders, then select a shortcut from within that folder, then capture some text input, and insert the AppleScript code to run it at the current cursor position to run the shortcut with the text as input to be processed by the shortcut.
External Trigger: scaspaste
Allows you to specify a shortcut by name (passed in as the “{query}”), and insert the AppleScript code to run it at the current cursor position to run it. The shortcut does not receive any input.
External Trigger: scasipaste
Allows you to insert the AppleScript code to run it at the current cursor position to run a shortcut with text input by passing in the input as {query}
, and setting the shortcut name via the variable shortcut2run
.
Snippet Trigger: scpop+
Allows you to select a shortcut all available Shortcuts folders, and insert a script at the current cursor position that can be used by PopClip to add a snippet to run a Shortcut. You can edit the details such as the name and icon before installing if you wish, but these are defaulted to the script name and the first character of the script name respectively.
Snippet Trigger: scpopf+
Allows you to select a shortcut folder from all available Shortcuts folders, select a Shortcut in that folder, and insert a script at the current cursor position that can be used by PopClip to add a snippet to run a Shortcut. You can edit the details such as the name and icon before installing if you wish, but these are defaulted to the script name and the first character of the script name respectively.
External Trigger: scpop
Allows you to specify a shortcut by name (passed in as the “{query}”), and insert a script for that shortcut at the current cursor position that can be used by PopClip to add a snippet to run a Shortcut. You can edit the details such as the name and icon before installing if you wish, but these are defaulted to the script name and the first character of the script name respectively.
There are some flows that are about working more generally with Shortcuts and Bypass, and do not fit neatly within the other categories. They have simply been gathered together under this one.
Keyword Trigger: sciconextractor
To extract the icon of a shortcut, Bypass utilises a Shortcuts shortcut. However, this can’t currently be bundled and run with the Alfred workflow. Instead, the user has to download the shortcut and load it into his/her Shortcuts library. Running this flow will open the download/install page for the shortcut.
When the shortcut is installed, the user is prompted to select a location where extracted icons will be placed. Extracted icons are named after the shortcut, and will overwrite previous icon files of the same name, so it is important that your shortcuts are uniquely named, but that goes for being able to run them too.
Keyword Trigger: scicon
External Trigger: scicon
Triggering this workflow will attempt to export the icon for a shortcut. When run via a keyword you can filter through a list of available shortcuts, whereas for the external trigger you must pass in the exact name of the shortcut via the query.
The workflow checks that the custom shortcut used for extracting shortcut icons is installed. It does this by checking for the existence of the shortcut name held in the SaveShortcutIcons
environment variable - so if you happen to rename or build your own version of the shortcut, this is the variable that you would need to modify. If the shortcut is not installed, a dialog will be displayed informing you it must be installed, and it will then proceed to the download page for the custom shortcut. At that point, the flow will stop and no icon will be extracted.
If the icon extraction shortcut is available, it will then be executed and the icon for the specified shortcut will be saved to the folder specified in the shortcut - a location specified when you install and configure the shortcut.
Keyword Trigger: schelp
This flow will provide a list of websites that can be automatically opened in the default browser. The websites provide help for the use of Bypass and Shortcuts.
The Elgato Stream Deck is a micro-keyboard with LCD screens on the buttons. Through the Stream Deck software and plugins you can configure the Stream Deck to dynamically perform a variety of operations and it makes a great automation tool. One of the things you can do using Bypass is to easily set-up a Stream Deck with actions to run shortcuts. This utilises some inbuilt scripting in Bypass, as well as an optional custom shortcut for extracting icons for shortcuts.
More information on Bypass’ support for Elgato Stream Deck users is available in this blog post.
Keyword Trigger: scsdauto
Utilising a special shortcut icon extractor shortcut, Bypass can save the icon for a specified shortcut. This extraction can be incorporated into the Stream Deck command generation flows described in this section. Icons will be extracted when the AutoExtractIcon
environment variable is set to 1
.
This flow is a convenience function saving you from maintaining the value in the environment variable settings for the workflow. Running this flow will toggle the value of the variable between 1
and 0
. Note, that when you begin to trigger the flow you will see in the flow’s subtitle the current value of the variable.
Snippet Trigger: scsd+
Place the cursor in a Stream Deck Open action’s “File/App” field and type in the trigger snippet to select a shortcut from all available shortcuts and insert a command to run it into the field. The shortcut does not receive any input.
If the AutoExtractIcon
environment variable (see Stream Deck - Automatically Extract Shortcut Icon) is set to 1
, the action will also attempt to run a Shortcuts shortcut to export the icon for the specified shortcut. This is via the scicon
external trigger.
Snippet Trigger: scsdi+
Place the cursor in a Stream Deck Open action’s “File/App” field and type in the trigger snippet to select a shortcut from all available shortcuts and insert a command to run it into the field. You are also prompted for text to pass as input to the shortcut that is then included in the command.
If the AutoExtractIcon
environment variable (see Stream Deck - Automatically Extract Shortcut Icon) is set to 1
, the action will also attempt to run a Shortcuts shortcut to export the icon for the specified shortcut. This is via the scicon
external trigger.
Snippet Trigger: scsdf+
Place the cursor in a Stream Deck Open action’s “File/App” field and type in the trigger snippet to select a shortcut folder from all available Shortcuts folders, then select a shortcut from all available shortcuts and insert a command to run it into the field. The shortcut does not receive any input.
If the AutoExtractIcon
environment variable (see Stream Deck - Automatically Extract Shortcut Icon) is set to 1
, the action will also attempt to run a Shortcuts shortcut to export the icon for the specified shortcut. This is via the scicon
external trigger.
Snippet Trigger: scsdfi+
Place the cursor in a Stream Deck Open action’s “File/App” field and type in the trigger snippet to select a shortcut folder from all available Shortcuts folders, then select a shortcut from all available shortcuts and insert a command to run it into the field. You are also prompted for text to pass as input to the shortcut that is then included in the command.
If the AutoExtractIcon
environment variable (see Stream Deck - Automatically Extract Shortcut Icon) is set to 1
, the action will also attempt to run a Shortcuts shortcut to export the icon for the specified shortcut. This is via the scicon
external trigger.
Snippet Trigger: aesd+
Place the cursor in a Stream Deck Open action’s “File/App” field and type in the trigger snippet. You will then be prompted to enter the name for an Alfred external trigger, followed by the bundle ID for the workflow the external trigger is available in. Bypass then inserts a command into the field that the Stream Deck can use to call the flow linked to the external trigger.
This utilises an AppleScript application as other methods were being blocked by the macOS security options - which were not shown to the end user due to background processing. Handing off to the AppleScript application allows it to prompt for control of Alfred is not available, and to then interact with Alfred to call the external trigger.
This section contains bonus features. These features are not specific to working with Shortcuts, but do enhance what is possible using Bypass.
Snippet Trigger: alfext+
Place the cursor in a field and type in the trigger snippet. You will then be prompted to enter the name for an Alfred external trigger, followed by the bundle ID for the workflow the external trigger is available in. Bypass then inserts an open
command into the field that the Stream Deck can use to call the flow linked to the external trigger.
There are a variety of ways to access different functionality included in Bypass.
Keyword triggers are text entered directly into the Alfred window to trigger a flow.
Universal actions are initiated via Alfred’s universal action hot key, and trigger a flow with the context as input.
Action Name | Functionality |
---|---|
Send to a shortcut | Run Shortcut on Text/URL |
Send file to a shortcut | Run Shortcut on File |
Snippets are entered into any text field and trigger a flow.
External triggers can be used within any Alfred workflow to call a flow in Bypass, or even externally through a AppleScript call.
AutoExtractIcon
changed from an environment variable to user configuration.sc
as an alternative trigger to scrun
(added by popular request).Bypass is just one of several Alfred workflows I have created. You can find more workflows and blog posts related to Alfred on my Alfred page