Back Original

Nanobrew: The fastest macOS package manager compatible with brew

The fastest macOS package manager. Written in Zig.

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

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

7.6x faster

wget / 6 deps, cold

1.5x faster

ffmpeg / 11 deps, warm

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.