clier_parser 0.7.2

The underlying parser for the cli framework clier

Command Line Argument Parser for Rust

clier_parser is a command line argument parser for rust.


To start a new cli projects run:

$ cargo new demo && cd demo
$ cargo add clier_parser

Then define your CLI in src/

use std::env::args;
use clier_parser::Argv;

fn main() {
  let args: Vec<String> = args().collect();
  let parsed = Argv::from(args.as_slice());
  println!("{:#?}", parsed);

And try it out:

$ cargo run -- command subcommand -tfv testing --test=value --no-production --help
Argv {
  commands: [
  flags: {
    "test": "value",
    "production": "false",
    "help": "true",
    "try-me": "false",
    "t": "true",
    "f": "true",
    "v": "testing"