The prefix to use when falling back to environment variables for missing arguments.
Whether to enable the "key = value" syntax: When enabled, the values are parsed as if normal syntax was used
--flag=value -x
=> {
flag: "value",
x: true,
}
Otherwise, an error is thrown.
The logger used by the library to provide diagnostic information.
Whether users must provide at least one command.
The prefix to use for "negated boolean" syntax. An empty string means this feature is disabled.
--no-flag --other-flag
=> {
flag: false,
['other-flag']: true
}
The program description, shown in the help text.
The program name, shown in the help text.
The program version, shown in the help text.
The resolvers used by default. These are copied into the ArgState when a Args parser is constructed.
Whether to enable the "rest" syntax: When enabled, the values are collected
--flag value -x -- the rest value goes here
=> {
flag: "value",
x: true,
rest: "the rest value goes here"
}
Otherwise, an error is thrown.
When this is enabled, it will overwrite any arguments with the long flag of "rest"
Whether to enable the "short flag group" syntax When enabled, groups of short flags are parsed as if they had all been specified individually
-xyz -ab
=> {
x: true,
y: true,
z: true,
a: true,
b: true
}
Otherwise, a group is treated as a single argument.
This feature makes the assumption that any short flag with length > 1 is a group, even if it maps to a real short flag
What to do when an unrecognised argument (not defined in the schema) is passed in the user input.
What to do when an unrecognised command (not defined in the schema) is passed into the user input.
Generated using TypeDoc
What to do when a user runs a deprecated command.