{"repo":"google/argh","free":true,"listed":false,"github":"https://github.com/google/argh","clone":"git clone https://github.com/google/argh.git","description":"Rust derive-based argument parsing optimized for code size","language":"Rust","stars":1950,"topics":["argh","positional-arguments","subcommands","argument-parser","arguments","rust","rust-library"],"license":"BSD-3-Clause","category":"dev-tools","readme_excerpt":"Argh Argh is an opinionated Derive-based argument parser optimized for code size Derive-based argument parsing optimized for code size and conformance to the Fuchsia commandline tools specification The public API of this library consists primarily of the FromArgs derive and the from env function, which can be used to produce a top-level FromArgs type from the current program's commandline arguments. Basic Example ./some bin --help will then output the following: The resulting program can then be used in any of these ways: - ./some bin --height 5 - ./some bin -j --height 5 - ./some bin --jump --height 5 --pilot-nickname Wes Switches, like jump , are optional and will be set to true if provided. Options, like height and pilot nickname , can be either required, optional, or repeating, depending on whether they are contained in an Option or a Vec . Default values can be provided using the #[argh(default = \" \")] attribute, and in this case an option is treated as optional. Custom option types can be deserialized so long as they implement the FromArgValue trait (automatically implemented for all FromStr types). If more customized parsing is required, you can supply a custom fn(&str) - Result using the from str fn attribute: Positional arguments can be declared using #[argh(positional)] . These arguments will be parsed in order of their declaration in the structure: The last positional argument may include a default, or be wrapped in Option or Vec to indicate an optional or repeatin","default_branch":null,"files":null,"tree":[],"storefront":"/r/google","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/google/argh/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."}