lirantal/nodejs-cli-apps-best-practices

New Experience best practice request: help

lirantal opened this issue · 1 comments

Would be nice if someone would like to contribute a section on CLIs supporting help.

My points to make would be:

  • A CLI should support -h and --help to provide help
  • A CLI should show this help if it is ran without arguments (unless it is possible for it to execute well without them)
  • Provide help for sub-commands when those are being used
  • When conflicting args are both provided a clear message should indicate so

This all should be embodied in one item about supporting help.

Perhaps include a reference to http://docopt.org such that the help output is in a conventional format?

And that any help docs might also be available via man pages?