Homebrew Formula vs. Cask

Formulae and casks are both Homebrew packages, but they describe different distribution models. The distinction affects where software comes from, how Homebrew installs it, and which command you use.

What is a Homebrew formula?

A formula is a package definition for software that Homebrew can build from upstream source code. In practice, formulae commonly provide command-line tools, libraries, language runtimes, and background services.

Homebrew may install a pre-built bottle instead of compiling locally, but the formula still defines the source, dependencies, build steps, tests, and installation layout.

brew install wget

What is a Homebrew cask?

A cask installs a pre-compiled binary distributed by its upstream developer. Casks commonly represent macOS applications, fonts, plugins, and vendor installers, although supported binary artifacts can also target Linux.

The cask definition tells Homebrew where to download the software and which application, package, binary, or other artifact should be installed.

brew install --cask firefox

The quickest way to choose

If you want a command-line tool or library, start by looking for a formula. If you want a desktop application or another vendor-built binary, start with casks. Homebrew’s own search covers both collections, so you do not need to know the package type before searching.

  • Formula: usually open-source software Homebrew can build from source.
  • Cask: usually an application or pre-built binary published by the developer.
  • Some packages are exceptions, so confirm the type with brew info before installing.
brew info <package-name>

Official sources and further reading