I'm looking to create a CLI application in Python that can be run directly from the command line:
$ myapp command --flag --argument foo
or can be run as a REPL application:
$ myapp
(context)> command --flag --argument foo
(context)> other --with different --flags
I took a look at Click (including this question) and argparse, which seem to be good for the former but have limited support for the latter, and cmd2, which seems to be good for the latter but have limited support for the former.
Is there a recommendation for what to use in this situation? I have considered simply using two different libraries with their own wrappers to the same core "business logic", but I would prefer to use something built for this purpose, if such a thing exists.