What is brew (Homebrew) on MacOS?
— Tips, CLI, Terminal — 3 min read
Do you know what brew
(Homebrew) is? If the answer is no & that you are using MacOS and your Terminal ... how are you doing you automation work? 😉
What is brew?
Brew (or Homebrew) is what we would call an indispensable package manager for macOS. On their website they say that they are The Missing Package Manager for macOS
How to install brew
?
To install brew
, you will have to add this command in your Terminal
1/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
This is coming from the official website https://brew.sh/. And don't worry the script explains what it will do and then pauses before it does it. If you are looking for other ways to install this package manager on you machine, the website provide a dedicated page https://docs.brew.sh/Installation
brew
tips
Install something with Homebrew
To install something thanks to Homebrew, the command is brew
+ install
+ {what you're looking for}
. Let's take some examples with curl
& python
.
For the first one (curl
), it would be:
1brew install curl
For the second one (python), that would mean:
1brew install python
Search for something
You have two options for searching something with brew
: (1) from your terminal with brew
+ search
+ {keyword}
or (2) going to the website.
In the case below, I am looking for something related to SQL.
1brew search sql
Below you can find the results from my Terminal:
Another way to do a search with brew is to gor to theire website https://brew.sh/ and use the search there. Below you will see an example with Spotify (because yes you can install some "real software, calles Casks):
Not sure what a Formulae or a Casks is doing?
Don't worry, Homebrew got you cover thanks to desc
, which will give you a small description. Always useful before installing something for sure.
In your Terminal, you could do:
1brew desc {something you are looking for}
For example:
1> brew desc wget2wget: Internet file retriever
What I recommend you to install
For SEO, Python, data, ... stuff, I would recommend you to use brew
to install some Formulae and some Casks like python
, wget
, curl
(yes both, always useful), Screaming Frog, Spotify & Calibre. But why using Homebrew instead of downloading the software and installing it? Because here it does (1) Download, (2) Installation, (3) You don't have to drag & drop, (4) nore eject dmg.
You know me, install python ;-)
Yes, if you are curious and on this blog, you might already have installed it, but if it's not the case, you can use brew
to install it this way:
1brew install python
Both wget
and curl
Yes, both of them, this is always useful to have both of them to "play" and get the answer you are looking for!
1brew install curl2brew install wget
Screaming Frog, yes you read it well!
SEO will love that: you can install Screaming From with one line of brew install
. And then, you will also be able to launch Screaming Frog from your Terminal!
1brew install screaming-frog-seo-spider
Spotify, to get some music while working/coding
If you are like me -- Team Spotify -- you will be glad to see that you can use Homebrew to install Spotify.
1brew install spotify
There are a few reasons to install Shopify with homebrew on your mac. The first reason is that it is an easy way to get Shopify up and running on your computer. The second reason is that it is a free way to get Shopify installed on your mac & without an istall package to put inside the bin after!
Calibre for you to read
Also, if you like to read ebooks, I reacomment you the software Calibre. This software is really good and cool to help you manage your digital book library.
1brew install calibre
But why installing calibre with HomeBrew? There are a few reasons why you might want to install Calibre with homebrew on your mac.
- The first reason is that it is a very popular ebook reader and manager, and it is available for free.
- The second reason is that homebrew is a package manager for mac, and it makes it easy to install and update software. And as this article state, I strongly recommend you to use it!
- Finally, the third reason is that installing Calibre with homebrew is very easy & leave no trace.
Brave as browser on your mac
I think you know the deal now!
1brew install brave-browser
I chosed Brave over Google Chrome, but I am still using Firefox for other personal reasons. I am not recommending one or the other, it's just that some company are forcing Google Chrome based browser on company computers and Brave could be a good alternative! -- Yes I am not talking about Microsoft Edge or other companies forcing you to use 💀 Internet Explorer 💀
Many other Casks
You can for sure install some other software like google-chrome
, firefox
, ...
Learn more about brew
There are a lot of ressources out there to learn about brew, one in French I really like is the video made by Korben (from Korben.info)