Zerobrew can be configured using environment variables to customize installation paths and behavior. These variables can be set in your shell configuration or passed directly when running commands.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/lucasgelfond/zerobrew/llms.txt
Use this file to discover all available pages before exploring further.
Core Variables
The root directory where zerobrew stores all its data, including the package store, cellar, cache, database, and locks.This directory contains:
store/- Content-addressed package storagecellar/- Installed package metadatacache/- Downloaded package archivesdb/- SQLite database (zb.sqlite3)locks/- File locks for concurrent operations
- macOS:
/opt/zerobrew - Linux:
$XDG_DATA_HOME/zerobrew(typically~/.local/share/zerobrew)
The prefix directory where package binaries and libraries are symlinked. This is the directory you should add to your PATH.Platform-specific behavior:
- macOS: Defaults to
ZEROBREW_ROOTdirectly (e.g.,/opt/zerobrew) to maintain compatibility with Mach-O binary path length constraints (13 characters, same as Homebrew’s/opt/homebrew) - Linux: Defaults to
$ZEROBREW_ROOT/prefixto separate data from the installation prefix
bin/- Executable binarieslib/- Shared librariesinclude/- Header filesshare/- Shared data filesetc/- Configuration filesopt/- Individual package directories
Automatically initialize zerobrew without prompting when running commands for the first time.When set to
true, zerobrew will automatically:- Create the root and prefix directories
- Set up the internal directory structure
- Initialize the package database
- CI/CD environments where interactive prompts are not possible
- Automated scripts and provisioning tools
- Docker containers and other non-interactive environments
Additional Environment Variables
Zerobrew also respects and sets several other environment variables for compatibility and functionality:Package Config
Automatically set by zerobrew’s shell initialization to include
$ZEROBREW_PREFIX/lib/pkgconfig for pkg-config to find installed libraries.Example:SSL Certificates
Zerobrew automatically configures SSL certificate paths when available:Path to the CA certificate bundle for curl and other tools. Automatically set to one of:
$ZEROBREW_PREFIX/opt/ca-certificates/share/ca-certificates/cacert.pem$ZEROBREW_PREFIX/etc/ca-certificates/cacert.pem$ZEROBREW_PREFIX/etc/openssl/cert.pem$ZEROBREW_PREFIX/share/ca-certificates/cacert.pem
Path to the SSL certificate file. Uses the same priority order as
CURL_CA_BUNDLE.Directory containing SSL certificates. Automatically set to one of:
$ZEROBREW_PREFIX/etc/ca-certificates$ZEROBREW_PREFIX/etc/openssl/certs$ZEROBREW_PREFIX/share/ca-certificates
Usage Examples
Custom Installation Location
CI/CD Environment
Docker Container
Development Setup
CLI Flag Override
Environment variables can be overridden using CLI flags:Priority Order
Zerobrew determines configuration values in the following priority order (highest to lowest):- CLI flags -
--root,--prefix,--auto-init - Environment variables -
ZEROBREW_ROOT,ZEROBREW_PREFIX,ZEROBREW_AUTO_INIT - Existing installation - If
/opt/zerobrewexists, it will be used - Platform defaults - macOS uses
/opt/zerobrew, Linux uses$XDG_DATA_HOME/zerobrew
On macOS, the prefix must not exceed 13 characters due to Mach-O binary limitations. Zerobrew defaults to using the root directory as the prefix (
/opt/zerobrew) to maintain compatibility with Homebrew’s path length.