OptionalaliasAliases for the option or command. Can be a single string or an array of strings.
OptionalargDefault argument values for the option or command.
After parsing, the parser applies this accordingly:
The source will be "default".
OptionalargsSpecifies arguments for the command or option.
"<name type>" or "[name type]". Types: number, string, boolean, and float.
<> denotes a required argument, while [] denotes an optional argument.
string and can be omitted, e.g., "<name>". A blank space omits name,
e.g., "< string>". Both can be omitted, e.g., <>."<arg string>", "[arg number]", or "<arg1 boolean> <arg2 string>"...N or ..
"<arg string..3>" or "<..3>" means 3 arguments are required."<..>" for 0 to many; "<..1,>" or "<..1,Inf>" for 1 to many, indicating at least 1 is required.
OptionalcountingEnable counting how many times an option was specified in the command line. The value is the maximum number of times the option can be specified.
OptionalcustomSpecifies handlers for custom types.
The handler can be one of:
Example:
{
myCustomType: (value) => value.toLowerCase()
}
OptionaldescDescription of the option or command. Can be a string or a function that returns a string.
Optionalnamename of the option or command
OptionalrequiredIndicates whether the command/option is required. If true, the command/option must be specified.
Option Spec