Homebrew is the most popular package manager for Mac OS X. Homebrew Cask extends Homebrew with support for quickly installing Mac applications like Google Chrome, VLC, and more. No more dragging and dropping applications!
This is an easy way to install Mac terminal utilities and graphical apps. It’s a bit like Chocolatey or OneGet on Windows, or the package managers included with Linux. It’s even a way to install many of the useful apps that aren’t in the Mac App Store.
Homebrew is a package manager designed for installing UNIX tools and other open-source applications on Mac OS X. It will quickly download and install them, compiling them from source. Homebrew Cask extends Homebrew with support for installing binary apps — the kind you normally drag to your Applications folder from DMG files.
First, you’ll need the command-line tools for Xcode installed. On a modern Mac OS X system, you can install these just by running the following command in a Terminal window. You could also install the full Xcode application from Apple, if you prefer — but that takes up more space on your Mac and isn’t necessary.
Next, install Homebrew. You can just open a Terminal window, copy-paste the following command, and press Enter:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
This script informs you what it will do. Press Enter and then provide your password to install it. By default, it installs Homebrew so you can use the brew command without typing the sudo command and providing your password.
Run the following command once you’re done to ensure Homebrew is installed and working properly:
UPDATE: The below command is no longer necessary. Homebrew Cask is now automatically installed as part of Homebrew itself.
Once you’re done, run the following command to install Homebrew Cask. It uses Homebrew to install Cask:
brew install caskroom/cask/brew-cask
Now you can get started installing those graphical apps you want. This involves some very simple commands. To search for one, use the following command:
brew cask search name
To install an app, run the following command. Homebrew Cask will automatically download it, extract the app, and install it to your Applications folder.
brew cask install name
To uninstall an app with Homebrew Cask, run the following command:
brew cask uninstall name
The Homebrew command is the underlying package manager that installs all those UNIX and open-source utilities you might want. It’s the easiest way to install them on Mac OS X, just as it is on Linux. Like Homebrew Cask, it uses simple commands.
To search for a utility:
brew search name
To download and install that package:
brew install name
To remove that package from your system later:
brew remove name
For more details on using these commands, read the Homebrew Cask Usage guide or the Homebrew brew command manual on their official websites. Not every graphical application or Unix utility you’re looking for will be available, but most of them probably will be.
Unfortunately, there’s no graphical user interface for Homebrew Cask. This is a shame, because — while we geeks love easy terminal utilities — many people could benefit from easy software installation on Mac OS X. They can avoid all the downloading DMG files and clicking around. And, since Mac OS X is now home to Windows-style installer crapware, Homebrew Cask is a way around that.