Skip to content

Installation ​

Install a prebuilt zero binary with the installer, or download the release assets and install them yourself. Both paths use the tarballs published on GitHub Releases.

What you get

The zero binary runs project tasks such as zero migrator add. Your own app is still built with zig build; see Zero CLI for the command reference.

Quick install ​

bash
curl -fsSL https://zerofmk.in/install.sh | sh

The installer resolves the latest release tag, downloads the tarball for your platform together with its .sha256 file, verifies the checksum, and installs the binary to /usr/local/bin/zero. It uses sudo when that directory isn't writable.

Review the script first, or preview what it would do:

bash
curl -fsSL https://zerofmk.in/install.sh -o install.sh
ZERO_DRY_RUN=1 sh install.sh

To pin a specific release, download the script and pass the tag:

bash
sh install.sh v0.5.4

What the installer does ​

  1. Checks for curl and detects the OS/architecture via uname.
  2. Reads the latest tag from the GitHub Releases API, unless you pass one.
  3. Downloads zero-<target>.tar.gz and zero-<target>.tar.gz.sha256.
  4. Compares the SHA-256 hash of the archive with the checksum file.
  5. Extracts zero, makes it executable, and moves it to /usr/local/bin.
  6. Runs zero --version and reports the installed version.

macOS

The release workflow currently publishes Linux assets only. The installer exits with a clear message on macOS; build from source instead (see Build from source).

Release assets ​

The latest release is v0.5.4. Each target has an archive and a .sha256 checksum file; the release also carries a CycloneDX SBOM.

TargetArchiveChecksum
x86_64-linuxzero-x86_64-linux.tar.gz.sha256
aarch64-linuxzero-aarch64-linux.tar.gz.sha256

SBOM: final-sbom.json. For newer releases, start from Releases and substitute the tag and target in the URLs above.

Manual install ​

Download and verify the assets yourself, then place the binary on your PATH:

bash
VERSION=v0.5.4
TARGET=x86_64-linux                 # or aarch64-linux
BASE="https://github.com/im-ng/zero/releases/download/$VERSION"

curl -fsSL "$BASE/zero-$TARGET.tar.gz" -o zero.tar.gz
curl -fsSL "$BASE/zero-$TARGET.tar.gz.sha256" -o zero.tar.gz.sha256

EXPECTED=$(awk '{ print $1; exit }' zero.tar.gz.sha256)
ACTUAL=$(sha256sum zero.tar.gz | awk '{ print $1 }')
[ "$EXPECTED" = "$ACTUAL" ] || { echo "checksum mismatch" >&2; exit 1; }

tar -xzf zero.tar.gz
chmod +x zero
sudo mv zero /usr/local/bin/zero
zero --version
bash
# No prebuilt macOS assets yet — build the CLI from a zero checkout:
git clone https://github.com/im-ng/zero
cd zero
zig build zero
sudo cp zig-out/bin/zero /usr/local/bin/zero

The checksum file may name the archive with a dist/ prefix; comparing the hash directly (as above) avoids depending on the filename.

Requirements ​

  • curl and tar for the installer; sha256sum (Linux) or shasum (macOS) for verification.
  • sudo access if /usr/local/bin is not writable by your user.
  • OpenSSL (libssl/libcrypto) if zero --version reports a missing shared library: apt install libssl-dev on Debian/Ubuntu, brew install openssl on macOS.
  • Release binaries are built with -Dkafka=false -Dduckdb=false, so Kafka and DuckDB backends are not included. Build from source if you need them.

Build from source ​

With Zig 0.17.0 installed, from a zero checkout:

bash
git clone https://github.com/im-ng/zero
cd zero
zig build zero
sudo cp zig-out/bin/zero /usr/local/bin/zero

See Getting Started for the full dependency setup. Once installed, try zero --version and zero --help, then scaffold a migration with zero migrator add.