Documentation
Homebrew
brew tap nathanjmorton/zigc brew install zigc
Upgrade via Homebrew:
brew upgrade zigc
Note: If you installed via Homebrew, use brew upgrade zigc instead of zigc upgrade to avoid version conflicts. The two install methods use different paths (/opt/homebrew/bin vs ~/.zigc/bin) so they won't shadow each other, but stick with one upgrade method.
Shell script
curl -fsSL https://raw.githubusercontent.com/nathanjmorton/zigc/main/install.sh | bash
The installer detects your platform (macOS/Linux, arm64/x86_64), downloads the correct binary from GitHub releases, and places it at ~/.zigc/bin/zigc. It also adds ZIGC_INSTALL and updates your PATH in your shell config.
To install a specific version:
curl -fsSL https://raw.githubusercontent.com/nathanjmorton/zigc/main/install.sh | bash -s v0.1.0
Build from source
git clone https://github.com/nathanjmorton/zigc cd zigc zig build -Doptimize=ReleaseFast export PATH="$PWD/zig-out/bin:$PATH"
Requires Zig 0.16.0.
Upgrade
zigc upgrade
Checks GitHub for the latest release, compares to the current version, and downloads the correct binary for your platform. Replaces the binary in-place wherever it lives on your PATH — works with both the shell script install and build-from-source.
If you installed via Homebrew, zigc upgrade will detect it and tell you to use brew upgrade zigc instead.
Workflow
Create a project
zigc init my-app cd my-app
Scaffolds build.zig, build.zig.zon, src/main.c, and .gitignore. Use --cpp for C++.
Build and run
zigc build zigc run
Add a dependency
zigc registry update # fetch package registry (first time) zigc add lz4 # resolve from registry zigc add git+https://github.com/allyourcodebase/lz4.git#1.10.0-6 # or by URL
Registry-based adds write the URL + hash directly — no network fetch needed at add time. Both methods auto-generate the b.dependency() and mod.linkLibrary() boilerplate in build.zig.
Inspect and verify
zigc check --build zigc verify --symbols
Cross-compile to WASM
zigc build --wasi wasmtime zig-out/bin/my-app.wasm
Clean
zigc clean
Command reference
zigc init <name> [--cpp]Scaffold a new C/C++ projectzigc add <name|url> [--lib n]Add a dependency by registry name or URLzigc remove <name>Remove a dependency from manifest and build.zigzigc listShow all declared dependencies and pinned URLszigc registry updateFetch the latest package registryzigc registry generate [--limit N]Scrape allyourcodebase → registry.jsonzigc check [--build]Verify manifest fields, paths, and dep consistencyzigc verify [--symbols]Inspect object files and binary symbol tablezigc build [flags]Compile the project (zig build)zigc run [flags]Compile and run (zig build run)zigc cleanRemove .zig-cache/ and zig-out/zigc upgradeUpdate zigc to the latest releasezigc helpPrint usageFlag passthrough
zigc build and zigc run translate C-style flags to Zig build options:
-O3, -O2, -O1, -Ofast→ -Doptimize=ReleaseFast-Os→ -Doptimize=ReleaseSmall-Og→ -Doptimize=ReleaseSafe--wasi→ -Dtarget=wasm32-wasi--wasm→ -Dtarget=wasm32-freestanding-Wall, -Werror, -DFOO→ Accumulated into -Dcflags=...