I think `airflow connection list` etc would be nicer. The main reason it probably hasn't happened is that the cli "scaffold" we have in place right now doesn't easily allow a second level of sub-command, so it's a bit more work.
-ash > On 8 Feb 2019, at 05:24, jm.c...@gmail.com wrote: > > 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. The > current implementation has to handle validation of 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. > > This might overlap with other CLI refactoring, like > https://issues.apache.org/jira/browse/AIRFLOW-3358. I'm not sure if that > conversation is still active, though. > > Interested to get feedback about this--maybe there are advantages to using > flags instead of subcommands that I haven't thought of.