Brewlette - Discover homebrew packages
I’m kind of OCD about keeping packges updated, maybe to a fault. Blame it on growing up using Windows, my MIS degree with an Info Security option, or maybe it’s just me. One result of this obsession is that I run
brew update every morning on my Mac. This command updates the list of packages, even ones you don’t use, so after running it you’re presented with a list of all sorts of packages. If I’m not in a hurry, I’ll usually spot 1 or 2 packages that sound interesting, and might end up installing them. After doing this for a while, I decided that it would be cool if I could just issue a command and get a random package at will. Turns out this is actually easy to do.
Without further ado, I present:
$ brewlette Try out a random homebrew package! flvmeta: stable 1.2.1 (bottled), HEAD Manipulate Adobe flash video files (FLV) https://www.flvmeta.com/ Not installed From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/flvmeta.rb ==> Dependencies Build: cmake ✔ ==> Options --HEAD Install HEAD version Command "brew install flvmeta" copied to clipboard
Really, it’s just a simple shell script that I put in
/usr/local/bin (where brew usually installs packages). It works by picking a random package from the list of formulas that brew caches. One little nifty addition I made is that it copy the brew commmand to install the package to your clipboard. Just
⌘+v and enjoy the new package. For now the script is on a Github gist. Feel free to comment/fork if you want to make a contribution. Here’s the script: