Skip to main content

Home > @rushstack/ts-command-line > IBaseCommandLineDefinition

IBaseCommandLineDefinition interface

For use with CommandLineParser, this interface represents a generic command-line parameter

export interface IBaseCommandLineDefinition


descriptionstringDocumentation for the parameter that will be shown when invoking the tool with "--help"
environmentVariable?string(Optional) The name of an environment variable that the parameter value will be read from, if it was omitted from the command-line. An error will be reported if the environment value cannot be parsed.
parameterLongNamestringThe long name of the flag including double dashes, e.g. "--do-something"
parameterShortName?string(Optional) An optional short name for the flag including the dash, e.g. "-d"
required?boolean(Optional) If true, then an error occurs if the parameter was not included on the command-line.
undocumentedSynonyms?string[](Optional) Specifies additional names for this parameter that are accepted but not displayed in the command line help.