Hi, Here is the JIRA issue on this, https://issues.apache.org/jira/browse/STRATOS-1187
Here I have added some of the Python CLI frameworks I checked, I have added a brief for each of them. I also have state a score out of 10 to indicate how best they matches for our need. ( But they are as of my understanding! I may not be very correct in some cases. Because some of the ones I could write some codes and check, but for some I could not, manly because of errors ) *Cement *(6/10) A complex framework, every CLI commands is bound to a separate Python class that acts like an controller, and each controller have several functions. But no 'Interactive Mode' support, just 'Single command line mode'. Supports having '-' in CLI Commands ( like 'create-tenant' ) via aliases. But no much developments in Github repo recently. http://cement.readthedocs.org/ *Click *(7/10) Rich with features, uses Python Decorators to bind CLI commands to functions. But no 'Interactive Mode' support, just 'Single command line mode'. http://click.pocoo.org/3/ *Plac *(4/10) A scaled down version of Python argparse package. Uses set of if else statements to process the commands. But no 'Interactive Mode' support. http://plac.googlecode.com/hg/doc/plac.html *Cliapp *(3/10) No 'Interactive Mode' support. http://code.liw.fi/cliapp/docs/ *pyCLI *(3/10) No 'Interactive Mode' support. http://pythonhosted.org//pyCLI/ *Cliff *(9/10) A framework for building command line programs by OpenStack. It uses plugins to define sub-commands, output formatters, and other extensions. Supports 'Interactive Mode' using 'cmd2' and 'cmd' http://docs.openstack.org/developer/cliff/index.html *cmd *(8/10) Python in built packages for 'Interactive Mode' applications. Maps CLI commands to functions by function name, as def do_<whatever the command name> ( eg: def do_command1 is for command1 ). Support only arguments but no support for Unix-style flags. Have features like automatic command completion in 'Interactive Mode'. https://docs.python.org/2/library/cmd.html *cmd2 *(9/10) Extends the Python Standard Library’s cmd package. Can handle arguments and flags. Supports for Output Redirection and Piping ( As in a Unix shell ). Searchable command history ( bash-like history list editing ), can get last commands with arrow keys. Able to perform shell commands while in Interactive mode. ( eg: stratos>!ls or stratos>shell ls ) output can be colored. https://pythonhosted.org/cmd2
