| 1 | # RedCLAP - Command Line Arguments Parser (Redesigned) |
| 2 | |
| 3 | CLAP aims at being powerful and advanced command line interface library for Python 3 language. |
| 4 | Having built-in support for modes, optional and obligatory options, |
| 5 | options with arguments (with type-checking with arbitrary types) it enables programmers to |
| 6 | create rich command line interfaces for Python 3 programs. |
| 7 | |
| 8 | |
| 9 | ---- |
| 10 | |
| 11 | ## Features of CLAP: |
| 12 | |
| 13 | * support for single-level and nested modes (with per-mode and global options), |
| 14 | * support for grouped short options (`ls -lhR`), |
| 15 | * support for long options with or without equal-sign-connected arguments (`--log=./file.log` and `--log ./file.log` are both correct), |
| 16 | * support for option aliases (short/long names), |
| 17 | * support for typed arguments (`str`, `int`, `float` built-in and other arbitrary types via callbacks), |
| 18 | * built-in type checking of option arguments, |
| 19 | * support for multiple arguments for options (e.g. `--point 0 0`), |
| 20 | * checking for missing arguments with options which require them, |
| 21 | * checking for conflicting options (eg. `--quiet` must not come with option `--verbose`), |
| 22 | * support for options that MUST be passed to the program, |
| 23 | * support for options *required by* other options (e.g. `--key` requires `--value`), |
| 24 | * support for options *wanted by* other options (e.g. `--which` wants `--this` or `--that` or both), |
| 25 | * good set of exceptions with detailed error messages, |
| 26 | * ability to load interface from JSON descriptions, |
| 27 | * automatic generation of help screens (for `your-tool help` command) with per-mode, per-option, and per-operand descriptions, |
| 28 | usage examples, and more |
| 29 | * support for shortcuts for command names (shortest-unique name is sufficient for CLAP to resolve the command, it is not |
| 30 | necessary to write full names) |
| 31 | |
| 32 | CLAP is not the most easy to use command line arguments parser for Python, but I am quite confident that it is one |
| 33 | of the most powerful (if not *the* most powerful) framework for writing command line interfaces. |
| 34 | With excellent support for modes, options, and operands, automatic input verification, and help screen generation you |
| 35 | get a big return on your investment. |
| 36 | |
| 37 | ---- |
| 38 | |
| 39 | ## Manual and examples |
| 40 | |
| 41 | See the [Issue](https://git.sr.ht/~maelkum/issue) project which is the flagship |
| 42 | software for CLAP and uses all features the library offers. |
| 43 | |
| 44 | ---- |
| 45 | |
| 46 | ## License |
| 47 | |
| 48 | RedCLAP is published under GNU GPL v3 or GNU LGPL v3 (or any later version of one of this licenses). |