Skip to main content

Installation

Install zerobrew on macOS or Linux using the installation script.

Prerequisites

The installer will check for and install the following if needed:
  • curl - for downloading files
  • git - for cloning the repository (source builds only)
  • cargo and Rust toolchain (source builds only)

Quick install

1

Run the installation script

Download and execute the zerobrew installer:
The installer will:
  • Download the latest pre-built binaries for your platform (if available)
  • Fall back to building from source if pre-built binaries are unavailable
  • Install zb and zbx binaries to ~/.local/bin
  • Set up environment variables and PATH configuration
2

Configure your shell

After installation, run the export command that the installer prints, or restart your terminal:
The installer automatically modifies your shell configuration files (.zshrc, .bashrc, etc.) unless you use the --no-modify-path flag.
3

Verify installation

Check that zerobrew is installed correctly:

Installation options

The installer supports several options for customization:

Don’t modify PATH

Prevent the installer from modifying your shell configuration files:

Install from local binaries

If you’ve already built zerobrew locally, you can install the binaries directly:

View help

To see all available options:

Installation directories

zerobrew uses the following directory structure:
On macOS, zerobrew uses the root directory directly as the prefix to maintain compatibility with Mach-O binary path length constraints (13 characters, same as /opt/homebrew).

Supported platforms

Pre-built binaries are available for:
  • macOS: ARM64 (Apple Silicon), x86_64 (Intel)
  • Linux: ARM64, x86_64
If a pre-built binary isn’t available for your platform, the installer will automatically fall back to building from source.

Building from source

If you prefer to build from source or need a platform without pre-built binaries:
1

Install Rust

Install the Rust toolchain if you don’t have it:
2

Clone the repository

3

Build the binaries

The binaries will be available in target/release/.
4

Install the binaries

5

Initialize zerobrew

Troubleshooting

Command not found after installation

If zb is not found after installation, ensure ~/.local/bin is in your PATH:
Add this line to your shell configuration file (.zshrc, .bashrc, etc.) to make it permanent.

Build failures

If the source build fails, check that you have:
  • A recent version of Rust (run rustup update)
  • Required system libraries (the installer will guide you)

Permission errors

Do not run the installer with sudo. The installer will automatically request privileges when needed for system directory access.