Command Line Argument Parser for Rust
Clier is a command line argument parser and command framework for rust.
Parser
To start a new cli projects run:
$ cargo new demo && cd demo
$ cargo add clier
Then define your CLI in src/main.rs:
And try it out:
$ cargo run -- command subcommand --test=value --no-production --help --try-me=false
Argv {
commands: [
"command",
"subcommand",
],
flags: {
"test": "value",
"production": "false",
"help": "true",
"try-me": "false",
},
}
Framework
To start a new cli app run:
$ cargo new demo-app && cd demo-app
$ cargo add clier
Then define your CLI in src/main.rs: