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.

Terminal

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 alfred_script(q) and end alfred_script, for example:

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

iTerm2 integration

If iTerm2 is your terminal app of choice, you can find integration scripts for it on Vítor’s 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:

Video Tutorial: Using Web Searches and Creating Custom Searches in Alfred

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.