I'm familiarizing myself with the whole homebrew kit and the documentation is rather poor. What is a cask, Cellar and a tap?
3 Answers
Homebrew-Cask is an extension to Homebrew to install GUI applications such as Google Chrome or Atom. It started independently but its maintainers now work closely with Homebrew’s core team.
Homebrew calls its package definition files “formulae” (British plural for “formula”). Homebrew-Cask calls them “casks”. A cask, just like a formula, is a file written in a Ruby-based DSL that describes how to install something.
The Cellar is where Homebrew installs things. Its default path is /usr/local/Cellar
(/opt/homebrew/Cellar
on Apple Silicon). It then add symlinks from standard locations to it.
For example, when you type brew install git
:
- Homebrew installs it under
/usr/local/Cellar/git/<version>/
, with thegit
binary in/usr/local/Cellar/git/<version>/bin/git
- It adds a symlink from
/usr/local/bin/git
to that binary
This allows Homebrew to keep track of what’s installed by Homebrew versus software installed by other means.
A tap
is a source of formulae. The default is homebrew/core
but you can add more of them. The simplest way to create a formula for your own software is to create a GitHub repository called homebrew-<something>
; put your formula file in it; then type brew tap <username>/<something>
to add this new source of formulae to your Homebrew installation and so get access to all its formulae.
Some companies have internal Homebrew taps for their own utilities. There are a lot of public taps like atlassian/tap
for Atlassian software, or ska-sa/tap
for radio astronomy. Homebrew itself used to have additional taps like homebrew/science
but they deprecated them and imported the formulæ in homebrew/core
.
-
2formulae is the latin plural for formula, source: affixes.org/alpha/a/…. Commented Oct 9, 2021 at 17:29
-
4and thus in english ( dictionary.cambridge.org/dictionary/english/formula ). I personally prefer the less-obscure "formulas", but Homebrew calls them "formulæ". Commented Oct 11, 2021 at 13:44
-
As a side note: the Homebrew installation directory is
/opt/homebrew
for Apple Silicon. So the default path for Cellar is/opt/homebrew/Cellar
on Apple Silicon machines. Commented Apr 16, 2022 at 23:38 -
1
-
1@bfontaine. I see, thanks for the reference: it has been an interesting read. Where I work, plenty of visitors have been going to the wrong entrance and causing queues in another one for years. The signs are never blamed (and changed). Only the visitors are... because they do not understand the signs. Commented Feb 11, 2023 at 11:32
I personally differentiate brew
& cask
just based on 1 of the main (if not the only main) differences, of graphical GUI applications being managed by cask
rather than just brew
(as @SwiftMango points out: that is mostly, but not always true). (There are other differences too which I don't know as much about).
Below is adapted from 'Graham Miln' on apple.stackexchange:
Homebrew
brew
is the core command for the Homebrew project.
The missing package manager for OS X
Homebrew installs the stuff you need that Apple didn’t.
Homebrew typically deals with command line software (not graphical GUI applications). Most of the software is distributed under an open source license.
Cask
brew cask
is an extension to brew
that allows management of graphical GUI applications.
Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to OS X applications and large binaries alike.
Cask deals with a mixture of software and licenses.
Cask offers a way to command line manage the installation of graphical GUI applications.
Licensing
Availability through brew
or cask
does not imply any specific specific license.
-
1
-
1Update on command: The current version of homebrew deprecated the "brew cask" syntax. From now on, se the --cask modifier instead. brew <command> --cask– fossfoolCommented Oct 23, 2022 at 11:42
Quoting from official docs:
Cask
https://github.com/Homebrew/homebrew-cask
Homebrew Cask extends Homebrew and brings its elegance, simplicity, and speed to the installation and management of GUI macOS applications such as Atom and Google Chrome.
Cellar
https://docs.brew.sh/Formula-Cookbook
Homebrew installs to the Cellar and then symlinks some of the installation into /usr/local so that other programs can see what’s going on.
Tap
Taps (Third-Party Repositories)
brew tap adds more repositories to the list of formulae that brew tracks, updates, and installs from. By default, tap assumes that the repositories come from GitHub, but the command isn’t limited to any one location.