Find Related products on Amazon

Shop on Amazon

Show HN: Zli – A Batteries-Included CLI Framework for Zig

Published on: 2025-06-23 00:52:14

πŸ“Ÿ zli A blazing-fast, zero-cost CLI framework for Zig. The last one you will ever use. Build modular, ergonomic, and high-performance CLIs with ease. All batteries included. 🧱 Each command is modular and self-contained. inspired by Cobra (Go) and clap (Rust). πŸ“š Documentation See docs.md for full usage, examples, and internals. πŸš€ Highlights Modular commands & subcommands Fast flag parsing ( --flag , --flag=value , shorthand -abc ) , , shorthand ) Type-safe support for bool , int , string , , Named positional arguments with required , optional , variadic , , Auto help/version/deprecation handling Pretty help output with aligned flags & args Cobra-like usage hints, context-aware πŸ“¦ Installation zig fetch --save=zli https://github.com/xcaeser/zli/archive/v3.5.2.tar.gz Add to your build.zig : const zli_dep = b . dependency ( "zli" , .{ . target = target }); exe . root_module . addImport ( "zli" , zli_dep . module ( "zli" )); πŸ—‚ Suggested Structure your-app/ β”œβ”€β”€ build.zig β”œβ”€ ... Read full article.