Skip to content

Formulae vs Casks: Two Ways Homebrew Installs Software

A situations-based look at homebrew formula vs cask, showing which one a given request actually needs and why the distinction matters for how the software ends up on your machine.

The situation that reveals the difference

Most people bump into this choice by accident. They type a command to install something, and either it just works from the terminal afterward, or it shows up as an application icon they open by double-clicking. That single difference in outcome is the entire story of homebrew formula vs cask, and understanding it early saves a lot of confused searching later.

In homebrew package management, a formula is a set of instructions for building or fetching a command-line tool or a library, while a cask is a set of instructions for installing a macOS application that has a graphical interface. Both are handled by the same package manager, using the same commands, but the end result lands in a different place and behaves differently once installed.

When a formula is the right answer

A formula fits the situation whenever the goal is a tool you'll use from a terminal prompt: a scripting language runtime, a version control client, a text-processing utility, a database server you'll start and stop with commands. These are homebrew packages explained in their purest form — a name, a build recipe, a list of homebrew dependencies, and a place in the file system where the binary lands.

If you find yourself typing a tool's name expecting a response in the terminal, and nothing graphical needs to open, a formula is what you're reaching for. This is also the case for background services — things like local databases or caching layers that a developer starts once and forgets about until they're needed again.

When a cask is the right answer

A cask fits the situation whenever the end goal is opening an application window: a browser, a design tool, a communication client, a code editor with a visible interface. Instead of compiling anything, a cask typically downloads a disk image or an installer package and places the finished application into the Applications folder, exactly as if you had downloaded it by hand from a website.

Homebrew casks explained this way sound almost too simple, and that's largely true — a cask does less work than a formula because there's usually no building involved, just fetching, verifying, and moving files into place. The complexity a cask does carry usually involves permissions, since macOS treats manually placed applications differently from ones installed through the App Store.

What people get wrong

The most common mistake is assuming the two are interchangeable or that one is simply an upgraded version of the other. They aren't — they're suited to different categories of software, and trying to install a graphical application as a formula, or a command-line tool as a cask, either fails outright or produces something broken. The category of the software determines the category of the installation method, not personal preference.

A second mistake is expecting casks to behave exactly like formulae when it comes to updates and removal. Casks sometimes involve extra steps that formulae never need — accepting licenses, granting system permissions, or dealing with an application's own internal updater running alongside Homebrew's. Knowing this ahead of time turns a confusing surprise into an expected part of the process.

Side by side

Formula vs Cask in Practice

AspectFormulaCask
What it installsCommand-line tools, libraries, servicesGraphical desktop applications
Typical resultA binary reachable from the terminalAn application icon in the Applications folder
Build stepOften compiled or fetched as a binary packageUsually just downloaded and moved, no build
Dependency handlingResolves homebrew dependencies automaticallyRarely has dependencies beyond the OS itself
Update behaviorManaged entirely through Homebrew commandsSometimes paired with the application's own updater
Where it's definedIn homebrew repositories as formula filesIn homebrew repositories as cask definition files
Common questions

Formulae and Casks: What People Ask

How do I know if something is a formula or a cask before installing it?

Searching within Homebrew typically shows both categories, often labeled directly. As a rule of thumb, if the software has a visible window and icon, it's almost always a cask; if it's a tool you'd only ever type a name to run, it's a formula.

Can a single package be both a formula and a cask?

It's uncommon but not impossible — some software offers both a command-line version and a graphical one, in which case a project might maintain a formula for the former and a cask for the latter, listed under similar but distinct names.

Do casks use the same homebrew repositories as formulae?

Casks are typically sourced from a dedicated repository built specifically for graphical applications, separate from the main formula repository, though both are accessed through the same commands once configured.

Why does a cask sometimes ask for a password during installation?

Because installing an application into certain protected locations, or granting it system-level permissions, requires administrator approval on macOS — the same approval you'd give installing any application manually.

Do casks have homebrew dependencies the way formulae do?

Rarely in the same sense. Casks occasionally depend on a formula being present, or on another cask, but they don't typically have the deep dependency chains common to command-line libraries and tools.

Does homebrew bundle explained syntax handle both formulae and casks?

Yes — a Brewfile can list formulae, casks, and taps together, which is one of its more useful properties. The homebrew brewfile explained format simply prefixes each entry with its category, letting one file describe an entire setup regardless of type.

Is one type of package updated more often than the other?

It depends entirely on the underlying software, not the category. Some casks update frequently because the application itself ships new versions often; some formulae stay stable for long stretches because the underlying tool changes rarely.