Argzon: Command-line argument parsing library using ZON

,

It might seem like yet another CLI argument parsing library in Zig, but this one comes with a twist – it works based on a ZON struct of your CLI definition. And the inspiration behind it is @MasonRemaley’s amazing work on the compiler’s ZON implementation as well as structopt.

Long story short, I’ve rewritten structopt to support ZON-like structs. No fancy parsing, but pretty nice to use (will be even nicer once we’re able to import ZON files without result types).

See the example’s code and build step in the repo:

Also, here’s how zq uses it:

9 Likes

Nice, I’m looking forward to checking this out when I have a chance!

1 Like