Usage
Subcommands
install
Install packages from a Brewfile.path
Alias:
-fDefault: BrewfilePath to the Brewfile to read packages from.boolean
Install formulas but skip linking them into the prefix directory.
dump
Export currently installed packages to a Brewfile.path
Alias:
-fDefault: BrewfilePath to write the Brewfile to.boolean
Overwrite the file if it already exists. Without this flag,
dump will fail if the target file exists.Global Options
path
Environment:
ZEROBREW_ROOTOverride the root directory for zerobrew’s content-addressable store.path
Environment:
ZEROBREW_PREFIXOverride the prefix directory where packages are linked.number
Default:
20Number of concurrent operations to perform during installation.boolean
Alias:
--yesEnvironment: ZEROBREW_AUTO_INITAutomatically initialize zerobrew if not already set up.Brewfile Format
Brewfiles use a simple text format compatible with Homebrew:- Lines starting with
#are comments brew "name"- Install a formulacask "name"- Install a casktap "name"- Ignored by zerobrew- Plain package names are also supported
- Inline comments are supported:
jq # JSON processor - Duplicate entries are automatically deduplicated
Examples
Install from default Brewfile
Create aBrewfile in your current directory:
Install from custom file
Export installed packages
Brewfile:
Dump to custom file
Overwrite existing file
--force, if the file exists:
Install without linking
Workflow Examples
Sync environment across machines
On machine A:Project-specific dependencies
Add aBrewfile to your project repository:
Environment profiles
Create different Brewfiles for different purposes:Comparison with Homebrew
Error Handling
File not found
Empty Brewfile
If your Brewfile contains only comments:File exists (dump)
Brewfile already exists:
--force to overwrite:
Related Commands
zb install- Install individual packageszb list- List installed packageszb uninstall- Uninstall packages