C.W.K.
Stream
Lesson 04 of 05 · published

Formulae, Casks, Bottles, the Cellar, Taps

~12 min · homebrew, concepts, internals

Level 0Newbie
0 XP0/55 lessons0/16 achievements
0/80 XP to next level80 XP to go0% complete

Homebrew's internal vocabulary sounds whimsical — there's a Cellar, formulae, casks, bottles, taps, and a Keg — but every word maps to a precise concept. Knowing the words means you can read brew's output instead of squinting at it.

Formulae are Ruby files that describe how to install a CLI tool or library. They live in the homebrew-core tap. Casks are similar but describe how to install a macOS GUI application — they live in homebrew-cask. The same brew install command handles both, so the only practical difference is whether you add --cask.

Bottles are pre-compiled binary archives stored on GitHub Container Registry. When you brew install python, you almost always get a bottle — Homebrew downloads the prebuilt binary, unpacks it into the Cellar, and you're done in seconds. If a bottle isn't available for your macOS+architecture, Homebrew falls back to building from source, which can take minutes to hours.

The Cellar (/opt/homebrew/Cellar/) is where every installed formula physically lives — each formula gets its own versioned subdirectory, like git/2.45.0/. Homebrew creates symlinks from the Cellar into /opt/homebrew/bin/ so the tools land in your PATH. A single physical directory in the Cellar is called a Keg.

Taps are git repositories of additional formulae or casks — third-party collections you can add. The two built-in taps (homebrew/core and homebrew/cask) cover most needs, but specialized taps exist for fonts, niche tools, and vendor-specific software.

Code

Inspect the Cellar directly·bash
# Where physical packages live
ls /opt/homebrew/Cellar/
# git  python@3.12  ripgrep  postgresql@16  ...

# Each formula is versioned — multiple versions can coexist
ls /opt/homebrew/Cellar/python@3.12/
# 3.12.4  3.12.5

# Symlinks into /bin and /lib are what put the tool in your PATH
ls -la /opt/homebrew/bin/python3.12
# -> ../Cellar/python@3.12/3.12.5/bin/python3.12
Add a tap, install from it, untap·bash
# Example: add the Hashicorp tap
brew tap hashicorp/tap

# Install from the new tap
brew install hashicorp/tap/terraform

# List taps
brew tap

# Remove a tap (won't remove already-installed packages)
brew untap hashicorp/tap

External links

Exercise

Pick one tool you use daily and run 'brew info <tool>'. Read every line of output. Find: (1) the homepage URL, (2) the install path under the Cellar, (3) any caveats. Then 'cd' into the Cellar path and look around — see the actual files Homebrew installed. Demystifying the Cellar in your head is worth the five minutes.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.