Run Any Terminal Command With a Keyboard Shortcut Using Automator
If you often run the same Terminal command, it makes sense to do one of two things: create a text expander snippet or turn it into a keyboard shortcut. The How-To Geek shows you how to do the latter using Apple’s built-in Automator tool.
All you have to do is create a new Automator activity using the Run Shell Script command, enter the Terminal command, and add a shortcut to the System Preferences pane. The process is pretty straightforward, so head over to How-To Geek for a complete guide.
How to launch any Mac terminal command with a keyboard shortcut “wiki useful How-To Geek