{"repo":"Hejsil/zig-clap","free":true,"listed":false,"github":"https://github.com/Hejsil/zig-clap","clone":"git clone https://github.com/Hejsil/zig-clap.git","description":"Command line argument parsing library","language":"Zig","stars":1601,"topics":["zig-package","argument-parser","argument-parsing","command-line","command-line-parser","parsed-arguments","ziglang"],"license":"MIT","category":"cli-tools","readme_excerpt":"zig-clap A simple and easy to use command line argument parser library for Zig. Installation Developers tend to either use - The latest tagged release of Zig - The latest build of Zigs master branch Depending on which developer you are, you need to run different zig fetch commands: Then add the following to build.zig : Features - Short arguments -a - Chaining -abc where a and b do not take values. - Multiple specifications are tallied (e.g. -v -v ). - Long arguments --long - Supports both passing values using spacing and = ( -a 100 , -a=100 ) - Short args also support passing values with no spacing or = ( -a100 ) - This all works with chaining ( -ba 100 , -ba=100 , -ba100 ) - Supports options that can be specified multiple times ( -e 1 -e 2 -e 3 ) - Print help message from parameter specification. - Parse help message to parameter specification. API Reference Automatically generated API Reference for the project can be found at https://Hejsil.github.io/zig-clap. Note that Zig autodoc is in beta; the website may be broken or incomplete. Examples clap.parse The simplest way to use this library is to just call the clap.parse function. The result will contain an args field and a positionals field. args will have one field for each non-positional parameter of your program. The name of the field will be the longest name of the parameter. positionals will be a tuple with one field for each positional parameter. The fields in args and positionals are typed. The type is based on the n","default_branch":null,"files":null,"tree":[],"storefront":"/r/Hejsil","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Hejsil/zig-clap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}