Getting help is for free. Means: CLArgs takes care and displays appropriate help information when requested, based on the provided descriptions.
If you run the app without any parameter, a list of all available commands (verbs) is displayed.
> Demo2App
2 Commands available:
=======================================
Verb Description
---------------------------------------
MATH SUB Subtract two integer values.
MATH ADD Add two integer values.
If you specify a particular Commands follwed by /? explicit help for this command is displayed.
> Demo2App MATH ADD /?
MATH ADD Add two integer values.
--------------------------------------------------------------------------------
/Value1 Tags=a1,a required
The first addend or the minuend.
DEFAULT: '0'
/Value2 Tags=a2,b required
The second addend or the subtrahend.
DEFAULT: '0'
Help with line-breaks
In the case your helpText is a bit more detailed, you can use line breaks. Simply insert the | character anywhere in your text. It'll be replaced by a line-break.
[Command("MATH.SUB",
"Subtract two integer values."
+ "|I have decided to provide a bit more details, to demonstrate explicit line-breaks. "
+ "together with an extra long text that will be wrapped after 80 characters by default. ")]
public class SubCommand : CommandBase2<AdditionContext>
{ ...
By default, help text starts at column 20 and it wraps at column 80, unless you specify a hard-break, using |. See also Settings how to control line and column width.
MATH SUB Subtract two integer values.
I have decided to provide a bit more details, to demonstrate
explicit line-breaks. together with an extra long text that
will be wrapped after 80 characters by default.
--------------------------------------------------------------------------------