Install

Get zcli running.

Pick the install script for the CLI, or add zcli as a package dependency to start building.

Install script

Downloads the latest release binary for your platform and drops it in your install dir.

$ curl -fsSL https://zcli.sh/install.sh | sh

Requires curl and minisign. The script reads the latest release from GitHub, verifies the minisign signature over the checksums (fail closed) and the SHA-256 of the binary, then makes it executable. zcli upgrade verifies the signature natively. Details: release signing.

Add as a Zig package

The usual path: add zcli to build.zig.zon and import the module in build.zig.

.dependencies = .{
    .zcli = .{
        .url = "https://github.com/ryanhair/zcli/archive/refs/heads/main.tar.gz",
        .hash = "...", // zig build prints the correct hash
    },
},

Then follow steps 2 & 3 in the docs to wire up zcli.generate.

Build from source

Clone the repo and build with Zig directly.

$ git clone https://github.com/ryanhair/zcli.git
$ cd zcli && zig build

Built artifacts land in zig-out/bin/. Requires Zig 0.16.0+.

Shell completions

Usually the first thing people want right after install — tab-complete commands, subcommands, and flags in bash, zsh, or fish.

$ myapp completions install

Detects your shell, writes the completion script to the right location, and prints the one line to add to your shell profile if it can't do it automatically. Requires the zcli_completions plugin — on by default in a project scaffolded with zcli init.

Verify the install

$ myapp --version
myapp 0.1.0  ·  built with zcli v0.19.0
Requires
Zig 0.16.0 or newer
License
MIT — © 2025 Ryan Hair
Latest
v0.19.0
Read the getting-started guide →