Homebrew basics

Homebrew is a package manager that can download developer packages, applications, fonts, screensavers and more! To find out more, go to the Homebrew homepage.

Requirements

Make sure you have the XCode CLI tools installed:**

$ xcode-select --install

# Accept user agreement
$ sudo xcodebuild -license accept

Installation

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Casks

Install casks with

$ brew cask install <formula/token>

Update with

$ brew update
$ brew cask upgrade —-greedy

Search for casks simply using brew search or brew search —-desc. The use of brew cask search has been deprecated. You can uninstall formulas and casks hosted by third parties with the brew tap command. It uses a similar syntax to homebrew in that you call taps by user/repository

$ brew tap batman/homebrew-tap
$ brew cask install batman/tap/Gotham-maps

If a tap is hosted elsewhere than GitHub, then you will need to specify a URL after the username/repository. Tapping just uses git clone to download the tap, so any form accepted by git will work. For example, if a tap is hosted on bitbucket and is a private repo, use the ssh syntax of a repo after my tap name.

$ brew tap sticklerm3/homebrew-tap git@bitbucket.org:homebrew-tap.git

External commands

brew bundle

The brew bundle command is basically the same as the ruby bundle one except that it gathers all your formula, casks, and even the Mac App Store apps (using mas) so you can have an easy way to reinstall your apps & formula if need be, use it as a backup list, or so on.

# creates a global Brewfile for the system at $HOME/.Brewfile
$ brew bundle dump --global

# Checks installed formula to your global brewfile and informs you what will be (un)/installed before it does so
$ brew bundle cleanup --global --dryrun

On GitHub

Other

Updated: