Make Homebrew Do Your Dirty Work (MacOS/Linux)

The homebrew homepage

Just recently, I have been moved over to MacOS (not a personal choice, mind you), and I’ve been learning about some of the really cool features and programs it has to offer.

The one I want to share today is Homebrew, as I’ve used it time and again, and it has just made my life so much easier while grabbing new programs and setups.

Some of the reasons it’s great:

  • With a single line, you can install packages, apps, software or plugins. This can save you an incredible amount of time when installing several of these for a project.
  • Add the version you want. Adding an option with the version number is all it takes to install as old of a version as you want or need!
  • Using the command in any directory will work. It knows where to put it.
  • Easy to edit the install afterward, in case you need a specific setup.

The Proof

For example, I have an svg file that I want to compress, called photo.svg. Now to do this, I want to install yarn and svgo. Normally, I’d have to run over to the yarn website, run the manual install that requires several lines, curl commands and possibly expand a tarball. Now while it might be pretty straight forward, you may find it slightly more work if you are new to these commands/operating systems, possibly requiring a bit of research on new commands beyond what you were directly working on. And even if you are not new to these, it can be cumbersome… if you’re from either camp, Homebrew is going to change that for you. Instead, now that you have your handy Homebrew, you can just run:

brew install yarn

3 words. No research. Easy!

Similarly, with svgo, you can just run:

brew install svgo

Now you’re setup to go! Now you can spend your energy on using the tools for your work, rather than just setting them up.

Here’s a quick list of useful commands that come with Homebrew:

  • install – installs your package, program, app, etc.
  • create – allows you to create your own brew (or package/program that can be installed using homebrew)
  • list – lists all installs performed on your machine through Homebrew
  • upgrade – allows you to update one of your prior installs or all of them
  • outdated – lists all outdated installs on your machine
  • doctor – troubleshooting tool
  • uninstall – get rid of an unwanted install

Overall, Homebrew has been an awesome addition to my day-to-day workflow and has eliminated probably hours from reading through dry documentation. Its a pretty well-known package manager, but I hope you found this to be something new that you can try out as well!

And if you have questions about an embedded project you’re working on, Dojo Five can help you with all aspects of your devops for embedded journey! We are always happy to hear about cool projects or interesting problems to solve, so don’t hesitate to reach out and chat with us on LinkedIn or through email!

Leave a Reply

Your email address will not be published. Required fields are marked *