Core features of decline
mainCLI Idioms
decline supports standard Unix command-line patterns:
- Flags: Boolean switches (e.g.,
--quiet). - Options: Key-value pairs (e.g.,
--target <string>). - Positional Arguments: Arguments identified by position.
- Subcommands: Hierarchical command structures.
- Mutually-exclusive options: Ensuring only one of a set of options is provided.
- Custom validations: Logic to ensure input meets specific criteria.
Design Principles
- Full-featured: Supports complex CLI shapes including subcommands and validation.
- Helpful: Automatically generates usage text and precise error messages.
- Functional: Built on
cats, providing an immutable and functional API that works in both functional and imperative codebases.