cappa
cappa copied to clipboard
Declarative CLI argument parser
Not going to work in the short term. Some of the required functionality isn't merged yet, and none of it is in a released version. Also, type-lens only supports python...
```python arg: Annotated[ int, cappa.Arg(short="-v", action=cappa.ArgAction.count), cappa.Arg(long="--verbosity"), ] = 0 ``` Is the proposed syntax for this so far. This might be nicer as `X | Y`, but that gets...
This is probably blocked on https://github.com/DanCardin/cappa/pull/117. Realistically, the current `annotation` and `extra_annotations` used by the parsers is bad DX in comparison to something like `TypeView`. If all the parsers are...
The biggest barrier preventing me from using cappa right now is that it forces me to use less strict type-checking in my project, because of all of the untyped parts...
Just like we can do: ```python output = cappa.Output(error_format="[bold]insiders[/]: [bold red]error[/]: {message}") ``` ...I was wondering if it would make sense to allow such markup in `HelpFormatter.default_format` too, for example:...
Perhaps something like ```python @command(subcommands=[a, b]) def function(): ... def a(): ... def b(): ... ``` A syntax like this is essentially forced, given the lack of a real, namable...
According to the [Docs](https://cappa.readthedocs.io/en/latest/arg.html#arg-num-args): > `num_args=-1` can be used to indicate that 0 or more (i.e. unbounded number of) arguments will be consumed, similarly resulting in a sequence-type output (even...
would it be possible to add a `case_insensitive` parameter to `Arg`? ```python from dataclasses import dataclass from typing import Annotated import cappa @dataclass class Command: color: Annotated[ str, cappa.Arg( choices=["Red",...