From charlesreid1

Revision as of 03:10, 30 October 2018 by Admin (talk | contribs) (Created page with "A guide from Heroku containing 12 principles for creating great CLI apps: https://medium.com/@jdxcode/12-factor-cli-apps-dd3c227a0e46 ==Rule 1: Great help is essential== sho...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A guide from Heroku containing 12 principles for creating great CLI apps: https://medium.com/@jdxcode/12-factor-cli-apps-dd3c227a0e46

Rule 1: Great help is essential

show help with all of these:

# list all commands
$ mycli
$ mycli --help
$ mycli help
$ mycli -h

# get help for subcommand
$ mycli subcommand --help
$ mycli subcommand -h

Also consider shell completion!

Auto-documentation:

Autodoc.png

Rule 2: Prefer flags to arguments