Skip to main content

Helpful

CLIs support users by giving suggestions, being empathetic and providing error messages to move them forward.

Support

  • Always implement a help option with the two common flags: -h or --help
  • Structure help sections with usage, commands, arguments, options and examples
  • Provide help when users make invalid requests
  • Provide documentation both at the terminal and online
  • Document commands and extend documentation for your commands
  • Provide auto-completion when possible

Support - Do

Errors

  • Keep users informed
  • Provide text-based error descriptions
  • Present errors logically, e.g. by location or type
  • Present all errors where they are the most discoverable, e.g. at the end of the command line

Errors - Do

Errors - Don't