ceyhunkerti/argz
command line argument parser for zig
Supports:
app sub1 sub2
string
integer
boolean
-abc
is same as -a -b -c
Use zig fetch --save to pull a version of the library into your build.zig.zon
. (This requires at least Zig 0.11.)
zig fetch --save "https://github.com/ceyhunkerti/argz/archive/refs/tags/0.0.1.tar.gz"
Then in your build.zig
file
...
const argz = b.dependency("argz", .{
.target = target,
.optimize = optimize,
});
exe.root_module.addImport("argz", argz.module("argz"));
...
To access help, add -h
or --help
option. This will print the attached help for the current command.