Introduction To Homebrew

If you’re working on a mac as a developer you might have come across Homebrew. Homebrew is a very popular and well supported package manager for mac. It states “installs the stuff you need that Apple (or your Linux system) didn’t”.

To install Homebrew you can run the command in your terminal:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

After it finishes, it might take a while you can install packages with brew install. For example to install ripgrep

brew install ripgrep

Homebrew comes with some other useful commands that help making it to use and manage a bit easier. A formula is a package written in ruby - so think of a formula as the process by which you can install a package.

# show help info
brew help

# check system for potential problems
brew doctor

# Fetch latest version of homebrew and formula
brew update

# Show formulae with an updated version available
brew outdated

# Upgrade all outdated and unpinned brews
brew upgrade

# Upgrade only the specified brew
 brew upgrade <formula>

# Remove older versions of install formulae
brew cleanup

You might also want to check out homebrew cask which makes it very easy to install and manage applications. Read more about homebrew.

Instagram Post