About
clap
or Command Line Argument Parser
Is a simple-to-use, efficient, and fully-configurable library for parsing command line arguments.
clap
supports advanced features like argument relationships, subcommands, and much, much more.
A Quick Taste
The following Rust code is all it takes to get started:
|
extern crate clap; use clap::App; fn main() { App::new("myapp") .version("1.0") .about("Does great things!") .author("Kevin K.") .get_matches(); } |
If the user runs
$ myapp --help the following would be printed
|
$ myapp --help myapp 1.0 Kevin K. Does great things! USAGE: myapp [FLAGS] FLAGS: -h, --help Prints this message -V, --version Prints version information |
Features
Just a few of the many, many features
clap aims to be extremely fast and efficient. Arguments will be parsed without wasting CPU cycles or...
clap is fully configurable, yet still has common defaults for those applications that simply want be...
clap supports all standard argument types, flags/switches, options, free/positional arguments, and e...
clap can generate bash, fish, zsh and even PowerShell completion files at compile time! These can th...
Spend time building your application
Let us worry about the arguments
Why Choose clap
A few more features
clap generates your help message and usage strings for you automatically from the list of valid argu...
If the end user has a typo, clap will gently suggest a correction based on the current context.
I...
clap generates friendly, and informative error messages. These messages kindly inform the end user o...
clap is extremely easy and intuitive to use.
In fact, it’s so intuitive that all you may need is
One can define argument relationships easily, and intuitively. This includes everything from require...
You can define your list of valid arguments in a YAML file, keeping your main.rs clean and tidy.
Meet the Team
Growing one step at a time
OUR FACTS
Some Numbers that Speak
99
Dependant Repositories
Sponsors
See more about our incredible sponsors by clicking 'Sponsorship' above!
Latest blogs
Check out the latest posts from our blog
March 8, 2019
This is the second post in a series detailing the issues, progress, and design decisions used in clap v3. This post details removing the "stringly typed" natur...
March 8, 2019
I want to put out some notes on why clap v3 is taking so long. I'd also like to spell out what exactly I've been doing over the past few months and why there h...