Skip to main content
Installs one or more formulas from Homebrew, with support for pre-built bottles and source builds.

Usage

Arguments

string[]
required
One or more formula names to install. Supports regular formulas and casks (prefixed with cask:).Examples: jq, wget, git, cask:docker-desktop

Options

Install the formula but skip linking it into the prefix directory. The formula will be installed in the store but won’t be available in your PATH.Useful when you want to install a formula without making it immediately available.
boolean
Alias: -sBuild the formula from source instead of using pre-built bottles. This compiles the package locally using Homebrew’s Ruby DSL.Note: Source builds take significantly longer than installing bottles.
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. Must be at least 1.
boolean
Alias: --yesEnvironment: ZEROBREW_AUTO_INITAutomatically initialize zerobrew if not already set up.

Examples

Install a single package

Install multiple packages

Install without linking

The formula will be installed in the store but won’t be symlinked into your PATH. You can still run it using zbx jq.

Build from source

Install a cask

Performance

zerobrew uses several optimizations to speed up installations:
  • Content-addressable storage: Shared dependencies are deduplicated
  • APFS clonefiles: Zero-overhead copying on compatible filesystems
  • Concurrent downloads: Multiple packages downloaded in parallel
  • Warm cache: Previously downloaded bottles are reused
Typical speedups compared to Homebrew:
  • Cold cache (first install): 2-4x faster
  • Warm cache (reinstall): 7-30x faster

Error Handling

If a file already exists in the prefix directory, zerobrew will report a link conflict:
You can resolve this by:
  1. Uninstalling the conflicting package with Homebrew
  2. Using --no-link and running with zbx instead
  3. Manually removing the conflicting symlink

Formula not found

If a formula doesn’t exist or isn’t supported: