gitmyhub

zerobrew

Rust ★ 7.4k updated 9d ago

A 5-20x faster experimental Homebrew alternative

Zerobrew is a faster drop-in replacement for Homebrew on macOS and Linux that installs command-line software up to 7.6x faster using content-addressable storage and APFS clonefiles.

Rustsetup: easycomplexity 2/5

Zerobrew is an experimental package manager for macOS and Linux that installs software from the Homebrew ecosystem but does so significantly faster. Homebrew is the widely used tool for installing command-line programs on a Mac by typing something like "brew install git". Zerobrew replaces the client side of that process while still using Homebrew's existing list of packages, pre-built files, and infrastructure.

The speed improvement comes from two main techniques. First, zerobrew uses content-addressable storage, meaning that if two packages share identical files, those files are stored only once rather than duplicated. Second, it takes advantage of APFS clonefiles, a macOS feature that copies files without actually duplicating the data on disk until the copy is modified, making the physical install step nearly instant on warm runs. According to the benchmarks in the README, installing common packages is roughly 2 times faster on a cold run and up to 7.6 times faster when the package data has already been downloaded.

The command-line interface is close to Homebrew's. You run "zb install" to add packages, "zb uninstall" to remove them, and "zb bundle" to install everything listed in a Brewfile, which is a plain text file listing the packages a project or machine requires. There is also a "zbx" command to run a package without linking it into your shell path.

The project describes itself as experimental and recommends running it alongside Homebrew rather than removing Homebrew entirely. It is dual-licensed under MIT and Apache 2.0, and can be installed with a one-line curl command or through Homebrew itself.

Where it fits