Productivity tip: save frequently used Mac Terminal commands as Automator workflow

ADVERTISEMENT

There might be terminal commands that you use frequently. Instead of opening Terminal and copy-pasting the command every time you need it, you can create an Automator workflow for this.

Automator is a Mac utility to automate tasks that you may need to use frequently. To create our workflow, open Automator (from Applications). Click Custom and press Choose.

In the search box, search for and select Run Shell Script. Drag-drop it into the right column. Enter the Terminal command(s) that you want to automate into the Run Shell Script text box. Then hit Run button on upper right. After confirming that the command worked properly, go to File > Save As Plugin. Give it a name and select Finder as the Application.

From now, when you need to run the Terminal command, right click anywhere blank (ie. not on an icon) and choose More > Automator, and you can see the plugin that you created.

ADVERTISEMENT