LinuxCommandLibrary

brew-bundle

Manage Homebrew packages declaratively with a Brewfile

TLDR

Install all dependencies from Brewfile

$ brew bundle install
copy
Install from a specific Brewfile
$ brew bundle --file=[path/to/Brewfile]
copy
Dump installed packages to Brewfile
$ brew bundle dump
copy
Dump with descriptions as comments
$ brew bundle dump --describe
copy
Check if all dependencies are installed
$ brew bundle check
copy
Uninstall packages not in Brewfile
$ brew bundle cleanup
copy
Preview cleanup without removing
$ brew bundle cleanup --dry-run
copy
Use global Brewfile (~/.Brewfile)
$ brew bundle --global
copy

SYNOPSIS

brew bundle [subcommand] [options]

DESCRIPTION

brew bundle provides a declarative interface for managing Homebrew packages using a Brewfile. It can install, upgrade, and track packages from Homebrew formulae, Casks, Mac App Store, taps, and other sources.
Brewfiles specify the desired state of installed packages, making it easy to replicate development environments or maintain consistent setups across machines.

PARAMETERS

--file path

Use specified Brewfile location
--global
Use global Brewfile (~/.Brewfile or XDG location)
--describe
Add description comments when dumping
--force
Force cleanup/dump even if dependencies exist
--dry-run
Show what would happen without making changes
--verbose
Print detailed output
--no-upgrade
Don't upgrade already-installed packages

SUBCOMMANDS

install

Install/upgrade all dependencies from Brewfile (default)
dump
Write installed packages to a Brewfile
cleanup
Uninstall packages not in Brewfile
check
Verify Brewfile matches installed packages
list
List all dependencies from Brewfile
exec
Run command in isolated Brewfile environment

BREWFILE SYNTAX

$ tap "homebrew/cask"
brew "git"
brew "node", args: ["--HEAD"]
cask "firefox"
mas "Xcode", id: 497799835
vscode "ms-python.python"
copy

CAVEATS

Mac App Store packages (mas) require the mas CLI and being signed into the App Store. Cleanup removes packages not in Brewfile; use --dry-run first. Some casks may require administrator privileges.

SEE ALSO

brew(1), brew-cask(1), mas(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community