I guess our conceptions of CLIs are different. I wasn't thinking of developing complex textual formats that need to be parsed as input to a CLI program, I was thinking more like simple flags like `--do-operation=value` as opposed to a button in a GUI doing the same thing. If you have a function you want to call named foo() it should be pretty easy to just look for a `--foo` flag and run it. The problem becomes trickier if you have to parse some inputs from text. However, most CLIs I've seen for third party services use mostly simple flags, each of which corresponds to some simple operation. They may take an arg or two (e.g. `cli-client --foo 34 --title "Hello"`). If there is a more or less one-to-one mapping between functions and CLI flags, then it should be pretty easy to test. Testing a full-on parser for complex CLI commands is definitely harder, though.
If it is that simple, you can just devote this to package like typer. That's what I point to - don't write it.
I see people somehow read GUI along the lines, while I never even considered that as an option. Added a note and please read completely before commenting
CLI parsing (mapping to real calls) may have bugs. How do you test this?
Both options suggested eliminate this possibility completely.
> one of their core advantages is ease of automation and testing.
Any example when suggested options are any worse in this sense?