Workflow Icon

Run Command

Run commands using your shell configuration

Version 2024.1 by Vítor Galvão

This workflow requires Alfred 5.5.


Run shell commands without opening a terminal via the cmd keyword. Your shell’s configuration files will be loaded, making your custom aliases, functions, and more available to the environment. Commands execute relative to the frontmost Finder window to allow quick changes on the current working folder. Exit status is shown as a notification and output in a Text View.

Sending command

  • Run the command.
  • Run command but do not open output in Text View.
  • Show command history to rerun a command.

Use the Universal Action to send files and text as arguments to a command. If the placeholder from the Workflow’s Configuration is present in the text, it will be replaced with your arguments, otherwise they are appended to the end.

Universal Action selecting files

Universal Action command

The same modifiers apply. Separate command histories are created for commands ran with the Keyword or the Universal Action.

Command history

  • Run command.
  • Delete all command histories and saved outputs.
  • Y (or tap ) Quick Look saved output.