It is an Alfred workflow for you to easy brew on Alfred -- Search, get details and run Homebrew commands.
- Required: Python3, Alfred PowerPack
- Homebrew required to view and run commands, searching for casks and formulae information does not rely on homebrew.
- Simply type
brew
to show and search for all formulae and casks- By default, casks will be listed first, you can add 'cask' or 'formula' to your query (before or after) to further filter results (for example
brew vim formula
orbrew formula vim
will filter out casks results and only list formula. - Select any casks/formula, directly install by
command + enter
. - In the dropdown list at the end, there will be an "outdated" list, where you can
enter
to update. There will be an "installed" list, where you can quickly uninstall bycommand + enter
(clean uninstall) oroption + enter
- Quicklook information page on brew.sh by pressing
command + Y
on selected entries.
- By default, casks will be listed first, you can add 'cask' or 'formula' to your query (before or after) to further filter results (for example
-
Continue to type the full name or tab-complete the selected items (if enabled in Alfred) to show details of information (Analytics, install status and newest versions, urls ...) and commands, commands include install, uninstall, upgrade, show info ... Commands will depend on install status.
-
Alternatively, in the dropdown list, select any items and press
enter
to see more details and applicable commands.- Press
enter
on urls will open them in the browser, on commands will run them in terminal. - Quicklook urls are supported for all urls.
- Press
- View lists of homebrew leaves, installed formulae and casks, and outdated ones by typing keywords
leaves
,list
andoutdated
.- I also added the default search_keyword
brew
to show installed and outdated lists, so that you can see whether a package is installed, or outdated. - In the outdated list, you can update one-by-one or all-at-once with a simple
enter
. - In
leaves
andlist
, directly uninstall bycommand + enter
(clean uninstall) oroption + enter
- In
leaves
andlist
, tab-complete to view info andenter
to view/run commands as you do with defaultbrew
search. - In
leaves
, quicklook is also available.
- I also added the default search_keyword
PS: In the scripts, every function returns results based on brewtype
(either cask
or formula
), you can modify keywords and function arguments to make this workflow to the best your needs.
- Icon from Bukeicon, Freepik on flaticon.com
- Alfred forum