Option Help

Many CLI frameworks provide --help and -h options to print command help. Spring Shell has a built-in help command.

Commands extending AbstractCommand have --help and -h options by default. After parsing succeeds, either option renders help instead of executing the command, unless the command declares its own option with that name. Parsing errors, such as a missing value for a non-boolean option, can still prevent help from being displayed.

Both ways of asking for the help of a command, <command> --help (or <command> -h) and help <command>, render the same message. It reports the name and the description of the command, its synopsis, and its options, arguments and aliases, if any.

The help attribute of a command is reported as the DESCRIPTION section of that message and is omitted when the command does not define one. Unlike description, which is a one liner shown in the list of available commands, help is meant to be a longer explanation of what the command does.