Alfred 5.5 is here - Find out what's new

Terminal / Shell

If you frequently need to launch Terminal or shell commands, you can do so from within Alfred.


Prefix your shell command with > and Terminal will launch and run the command for you.

Changing Terminal preferences

In the Terminal / Shell preferences, you can choose an alternative prefix to > from a dropdown menu. You can also choose a different terminal application; By default, we support the macOS Terminal app.

Terminal Preferences

Custom Terminal integration

Choose the "Custom" option from the dropdown if you'd like to use your own AppleScript for terminal actions for Terminal apps.

Wrap the custom Terminal AppleScript in on alfred_script(q) and end alfred_script, for example:

on alfred_script(q)
    tell application "Terminal"
        do script q
    end tell
end alfred_script

iTerm integration

If iTerm is your terminal app of choice, you can find some excellent iTerm integration AppleScripts for the older and newer versions of iTerm on Alfred user Vítor Galvão's Custom iTerm Applescripts for Alfred Github page.

Using Terminal for advanced tasks

If you want to run more complex scripts and AppleScripts, take a look at the Workflows feature, which allows you to create advanced scripts connected to keywords and hotkeys.

You can also launch the Browse in Terminal action from a workflow.

Latest Blog Post:

Search Automation Tasks in Workflows

CacheFly Campaign Monitor

"Alfred" is a registered trademark of Running with Crayons Ltd. ©2024 Running with Crayons Ltd. All rights reserved.

Terms & Conditions, Privacy Policy, Cookies.