Install

Packages

1
zig fetch --save=zigcli https://github.com/jiacai2050/zigcli/archive/${COMMIT}.tar.gz

Replace ${COMMIT} with a real one, then in your build.zig, import the module like this:

1
2
3
4
5
const zigcli = b.dependency("zigcli", .{});

// Currently zigcli provide two packages.
exe.root_module.addImport("simargs", zigcli.module("simargs"));
exe.root_module.addImport("pretty-table", zigcli.module("pretty-table"));

CLI Programs

The latest pre-built binaries are available on the release page or you can build it from source.

1
git clone https://github.com/jiacai2050/zigcli.git

Then build with zig 0.13.0

1
make build
Last modified January 4, 2025: update docs (04296e3)