The CLI treats `airflow connection` as a single command, with `--list`, `--add`, etc. as flags. This means it's possible to pass options that can't be used together: passing `--list` with `--conn_id` should be invalid. Different flags are also required for listing, adding, and deleting connections. The current implementation has to handle validation of required, invalid, and mutually exclusive options separately for each command. I think the code would be simpler and easier to use if we used nested commands instead of flags: `airflow connections list` and `airflow connections add` would be separate subcommands that would take different arguments, and we wouldn't have to check for invalid combinations of commands and arguments.
- If we're thinking of additional refactoring for the cli module, such as using `click` instead of `argparse`, we might want to combine these changes.
- It might be possible to make this change without breaking backwards compatibility, but that would make the code a bit more complicated. Should we prefer simpler code or compatibility?