Jump to content

Homebrew workflow - learn more about formulas and casks


Recommended Posts

Hi there!

I am happy to share my recently created workflow, Alfred Homebrew.

 

Download from here to try it out!

What it does is basically show you a list of homebrew casks and formulas via the `cask` and `brew` keywords.

After tab completion of the selected item or typing the full name, it will show you the details.

 

zZoz6Ts.png

BrU7MiZ.png

b7bfLEf.png

 

 

Hope you guys will find this useful, and I greatly appreciate any feedback!

Edited by yinan
Link to comment

Would be great if you have the ability to uninstall as well, is that possible?

 

brew-uninstall [name]

bu [name]


Maybe with one of this two keywords, idk im not an expert haha. i didn't install something with the workflow because i dont need to install something yet but looks great, good job

Screenshot 2023-05-30 at 10.40.47.png

Link to comment

Hi @Elvis Gastelum, Thanks for your feedback and thank you very much for liking it!

 

I've updated the workflow to v1.1. Here are the changes:

 

- Merge the `cask` and `brew` keys to a single `brew` key, but you can still filter results by adding `cask` and `formula`.
- Add `leaves, lists, outdated` keywords to show leaves, and install outdated lists. In the `outdated` list, support upgrades one-by-one or all-at-once with a single click.
- Show specific commands and information depending on install status (`Enter` on any search results to view status and applicable commands)
- Separate commands menu and information menu. Information is shown by `tab-complete`, and the commands are shown by `Enter`.
- Add a `Back to search` button in the commands menu.

 

Regarding uninstall commands, now that the code will check if a package is installed (and whether outdated) after you press `Enter` on the selected item in the search menu.

30rtVus.png

For example, you can type `list` or `brew` or `leaves` to show your installed packages and enter to view the commands submenu, so there is an additional `enter` before running any commands. 

 

In principle, you can also show commands in the search menu like v1.0 did. but since there is a check for install status before show commands, there will be a delay if you show them in the main menu. In addition, I think it is better to view the information before running any commands (To avoid some accidental operation.)

 

More commands will be reviewed and added to the workflow, please have a try on v1.1 and let me know if you like.

Link to comment
3 hours ago, yinan said:

Hi @Elvis Gastelum, Thanks for your feedback and thank you very much for liking it!

 

I've updated the workflow to v1.1. Here are the changes:

 

- Merge the `cask` and `brew` keys to a single `brew` key, but you can still filter results by adding `cask` and `formula`.
- Add `leaves, lists, outdated` keywords to show leaves, and install outdated lists. In the `outdated` list, support upgrades one-by-one or all-at-once with a single click.
- Show specific commands and information depending on install status (`Enter` on any search results to view status and applicable commands)
- Separate commands menu and information menu. Information is shown by `tab-complete`, and the commands are shown by `Enter`.
- Add a `Back to search` button in the commands menu.

 

Regarding uninstall commands, now that the code will check if a package is installed (and whether outdated) after you press `Enter` on the selected item in the search menu.

30rtVus.png

For example, you can type `list` or `brew` or `leaves` to show your installed packages and enter to view the commands submenu, so there is an additional `enter` before running any commands. 

 

In principle, you can also show commands in the search menu like v1.0 did. but since there is a check for install status before show commands, there will be a delay if you show them in the main menu. In addition, I think it is better to view the information before running any commands (To avoid some accidental operation.)

 

More commands will be reviewed and added to the workflow, please have a try on v1.1 and let me know if you like.

Perfect, I will try it the next time I need to install some cask/formula 🎉

Link to comment

v1.2 Update:

 

fpT5bNd.png

  • Add name/description in the commands submenu
  • Now you can quickly access the commands menu via info keywords
  • Back to list button when nothing is found in the commands submenu
  • fix: show different upgrade and uninstall options for casks and formula
Edited by yinan
Link to comment

v1.3 Update:

  • Update: Add show commands after tab completion.
  • I found actually loading commands is not so slow, so I add show-commands in the default search
    (if it significantly slows down rendering info after tab completion, please submit an issue)
  • Removed `info` keywords, since it is now unnecessary.
  • Bug fix: press enter on URLs in the commands submenu will run them in the terminal.
Link to comment
  • 5 months later...

Hey, I just released a new version of the workflow see [here](https://github.com/yinan-c/alfred-homebrew/releases/tag/v1.4). Hope this will be useful!

 

In previous versions, when you are trying to install/uninstall a cask/formula, you have to enter or tab-complete first to show available commands. It could be helpful to show the details of a package when you are hesitated to install/uninstall, but it takes an extra step to show the commands. So in v1.4, for some occasions when you're ready to install without worrying about the details:

  • You can now directly install by `command + enter` on a selected item in the `brew` list without entering the commands sub-menu. This will help you save time.
  • You can also quick uninstall in `leaves` and `list` without entering sub-menu, directly uninstall by `command + enter`(clean uninstall) or `option + enter`. 
  • Don't worry about forgetting `list` or `leaves` commands, in the `brew` commands, you can also find the outdated, installed list at the very end, you can either search by their names or scroll from the bottom. And you can perform quick uninstallation as above.
  • In `list`, casks and formula are now separated by two different icons.
Edited by yinan
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...