A simply library for parsing command line arguments and subcommands when writing command line and console applications.
You can use clap to lay out a list of possible valid command line arguments and subcommands, then let clap parse the string given by the user at runtime.
When using clap you define a set of parameters and rules for your arguments and subcommands, then at runtime clap will determine their validity.
clap also provides the traditional version and help switches 'for free' by parsing the list of possible valid arguments lazily at runtime, and if not already defined by the developer clap will autogenerate all applicable "help" and "version" switches (as well as a "help" subcommand if other subcommands are defined as well).
After defining a list of possible valid arguments and subcommands, clap gives you a list of valid matches that the user supplied at runtime, or informs the user of their error and exits gracefully. You can use this list to determine the functioning of your program.
Then run cargo build or cargo update for your project.
You can also find full usage examples in the examples/ directory of this repo.