LmCast :: Stay tuned in

Nanobrew: The fastest macOS package manager compatible with brew

Recorded: March 25, 2026, 3 a.m.

Original Summarized

nanobrew — the fastest macOS package manager

nanobrew

GitHub
Docs
Benchmarks

nanobrew
The fastest macOS package manager. Written in Zig.

$ curl -fsSL https://nanobrew.trilok.ai/install | bash
copy

Then restart your terminal or run the export command it prints.

3.5ms
warm install time
7,000x faster than Homebrew · faster than echo

Speed
Apple Silicon, macOS 15, same network. Cold = fresh download. Warm = cached in store.

tree / 0 deps, cold

brew
8.99s

nb
1.19s

7.6x faster

wget / 6 deps, cold

brew
16.84s

nb
11.26s

1.5x faster

ffmpeg / 11 deps, warm

brew
~24.5s

nb
3.5ms

7,000x faster

Quick start

$ nb install jq
==> Resolving dependencies...
    [38ms]
==> Installing 1 package(s):
    jq 1.7.1
==> Downloading + installing 1 packages...
    ✓ jq
==> Done in 1102.4ms
 
$ nb list
jq 1.7.1
 
$ nb update # self-update nanobrew
==> Updating nanobrew...
==> nanobrew updated successfully

How it works

01
Resolve
BFS parallel dependency resolution across concurrent API calls

02
Download
Native HTTP with streaming SHA256 verification in a single pass

03
Extract
Unpack into content-addressable store keyed by SHA256

04
Materialize
APFS clonefile into Cellar — copy-on-write, zero disk cost

05
Link
Symlink binaries into PATH and record in local database

Why it's fast

APFS clonefile
Copy-on-write materialization via macOS syscall. Zero disk overhead per install.

Parallel everything
Downloads, extraction, relocation, and dependency resolution all run concurrently.

Native HTTP
Zig std.http.Client replaces curl subprocess spawns. One fewer process per bottle.

Native Mach-O
Reads load commands from binary headers directly. No otool. Batched codesign.

Content-addressed store
SHA256-keyed dedup means reinstalls skip download and extraction entirely.

Single static binary
No Ruby runtime. No interpreter startup. No config sprawl. Just one ~2MB binary.

GitHub
Benchmarks
Apache 2.0

Built with care. Powered by Homebrew's bottle ecosystem.

Nanobrew distinguishes itself as a macOS package manager designed for exceptional speed and efficiency, leveraging the Zig programming language. The core functionality centers around a streamlined installation process initiated with a single command: `curl -fsSL https://nanobrew.trilok.ai/install | bash`. Following installation, the user is prompted to either restart their terminal or execute the export command provided, establishing the nanobrew executable. The documentation prominently highlights a performance advantage of approximately 7,000 times faster compared to Homebrew and even faster than the simple `echo` command. Benchmarking tests, conducted on Apple Silicon with macOS 15 under identical network conditions, demonstrate this speed differential clearly, showcasing considerably reduced installation times.

The installation methodology utilizes a sophisticated dependency resolution system that employs a Breadth-First Search (BFS) approach, executed concurrently to accelerate the process. The download component incorporates native HTTP functionality utilizing streaming SHA256 verification, consolidating the download and verification steps into a single operation. Downloaded binaries undergo extraction into a content-addressable store, indexed via SHA256 hashes, facilitating deduplication during subsequent installations, thereby minimizing redundant data transfers. A key feature focuses on APFS clonefile technology—a macOS mechanism that enables copy-on-write materialization, eliminating any associated disk overhead during installations. Finally, the package is linked into the system’s PATH and recorded within a local database.

Several technical innovations contribute to nanobrew’s speed and efficiency. Its native HTTP client, assembled within the Zig language, diminishes the overhead associated with spawning external processes such as `curl`. Furthermore, the use of native Mach-O reading avoids the reliance on `otool`, with batched codesigning streamlining the process. The content-addressed store, utilizing SHA256 hashing for keying, ensures efficient deduplication, preventing redundant downloads and extraction. Importantly, the package manager is deployed as a single static binary, removing the need for a Ruby runtime environment or any interpreter startup, resulting in a minimal footprint of approximately 2MB.

The “How it Works” section offers a detailed breakdown of nanobrew’s operational stages. Initially, the system performs parallel dependency resolution across multiple API calls. Next, it utilizes native HTTP for downloads, incorporating streaming SHA256 verification to ensure data integrity. Downloaded packages are then extracted into a content-addressed store, keyed by their SHA256 hashes. Finally, the binaries are materialized through APFS clonefile technology into the Cellar, representing a copy-on-write strategy that achieves zero disk overhead during installation, followed by linking the binaries into the system PATH and recording them in the local database.

The underlying reasons for nanobrew’s performance are clearly articulated. The use of APFS clonefile eliminates disk I/O during installation. Parallel execution of downloads, extraction, relocation, and dependency resolution occurs simultaneously. The shift to a native HTTP client reduces process spawning. Furthermore, the content-addressed storage strategy enables efficient deduplication. The single static binary design eliminates extraneous runtime components, furthering the package manager's efficiency. The documentation includes commands for installing packages (`nb install`), listing installed packages (`nb list`), and updating the package manager itself (`nb update`). The project is available on GitHub and licensed under the Apache 2.0 license.