Skip to main content
The brew module manages packages and casks on macOS using Homebrew package manager.

Functions

packages

Install, remove, or update brew packages.
str | list[str]
List of packages to ensure.
bool
default:true
Whether the packages should be installed.
bool
default:false
Whether to upgrade packages without a specified version.
bool
default:false
Run brew update before installing packages.
bool
default:false
Run brew upgrade before installing packages.
Package versions can be pinned like brew: <pkg>@<version>

Examples


update

Update brew package repositories.
This operation is not idempotent - it will always execute.

upgrade

Upgrade all brew packages.
This operation is not idempotent - it will always execute.

casks

Install, remove, or update brew casks (applications).
str | list[str]
List of casks to ensure.
bool
default:true
Whether the casks should be installed.
bool
default:false
Whether to upgrade casks without a specified version.
bool
default:false
Run brew cask upgrade before installing casks.
Cask versions can be pinned like brew: <pkg>@<version>

Example


cask_upgrade

Upgrade all brew casks.
This operation is not idempotent - it will always execute.

tap

Add or remove brew taps (third-party repositories).
str
The name of the tap (e.g., user/repo).
bool
default:true
Whether this tap should be present or not.
str
The URL of the tap. See https://docs.brew.sh/Taps

Examples

Common Use Cases

Development Environment Setup

Install from Custom Tap

Full System Update

Database Tools

Install Browser for Testing

Homebrew-Specific Tips

Homebrew provides service management for installed packages:
Remove old versions of installed packages:
Verify Homebrew installation:
  • Formulae are command-line tools and libraries (use brew.packages)
  • Casks are macOS applications (use brew.casks)