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.upgrade
Upgrade all brew packages.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.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
Services Management
Services Management
Homebrew provides service management for installed packages:
Cleanup Old Versions
Cleanup Old Versions
Remove old versions of installed packages:
Check Installation Health
Check Installation Health
Verify Homebrew installation:
Formula vs Cask
Formula vs Cask
- Formulae are command-line tools and libraries (use
brew.packages) - Casks are macOS applications (use
brew.casks)
