Interactive prompts

For accepting input, if stdin is a tty then prompt rather than forcing the user to specify a flag. Never require a prompt though. The user needs to be able to automate the CLI in a script so allow them to override prompts always.

Before executing the command, display what it looks like, to help the users learn how to use the CLI without the prompt.

E.g (the command following the interactive prompt shown below, huge thanks to Amy, working on MAAS UX for the awesome prototype)

$ maas deploy machine-name os=ubuntu release=18.04


Is this the same guideline for yes/no answers? Like snapcraft register

There was a [default=No] prompt in the demo.
Though what library would be used to provide the interactive menuing being shown is interesting. Is there a common ncurses that would give similar results in both Python and Go?

1 Like

This is certainly very pretty, it would be interesting to have libraries in all of our common languages to provide the infrastructure (output a prompt with a menu list of items you could chose from).