Module: help
Classes
Type Aliases
GenerateTableCommandConfig
Ƭ GenerateTableCommandConfig: Object
Type declaration
Name | Type | Description |
---|---|---|
lineLength? | number | Length of each row in the table |
compact? | boolean | When false , each row is separated by a blank line |
nameStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the command/option name |
nameStyle.bold? | boolean | - |
nameStyle.underline? | boolean | - |
nameStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
nameStyle.reset? | boolean | - |
descriptionStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the command/option description |
descriptionStyle.bold? | boolean | - |
descriptionStyle.underline? | boolean | - |
descriptionStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
descriptionStyle.reset? | boolean | - |
namePrefix? | string | Prefix for the command/option name (default is the command's prefix) |
aliasPrefix? | string | Prefix for the command/option aliases (default is the command's prefix) |
Defined in
GenerateTableOptionConfig
Ƭ GenerateTableOptionConfig: Object
Type declaration
Name | Type |
---|---|
lineLength | undefined | number |
compact | undefined | boolean |
nameStyle | undefined | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } |
descriptionStyle | undefined | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } |
namePrefix | undefined | string |
aliasPrefix | undefined | string |
displayNegations | undefined | boolean |
displayDefaultValue | undefined | boolean |
defaultValueStyle | undefined | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } |
Defined in
HelpConfig
Ƭ HelpConfig: Object
Type declaration
Name | Type | Description |
---|---|---|
lineLength? | number | Maximum length of a row in the help output |
descriptionStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the help description |
descriptionStyle.bold? | boolean | - |
descriptionStyle.underline? | boolean | - |
descriptionStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
descriptionStyle.reset? | boolean | - |
bindCommand? | boolean | Whether to bind the help command to this command Set this to true to automatically add a help command to this command's subcommands. |
bindOption? | boolean | Whether to bind the help option to this command Set this to true to automatically add a --help option to this command's options. |
useGlobalTableColumns? | boolean | Whether to align all tables to the column widths, or have each table be independent. Default is true |
commandOptions? | { compact? : boolean ; nameStyle? : { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } ; descriptionStyle? : { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } ; namePrefix? : string ; aliasPrefix? : string } | Options for generating the table of commands |
commandOptions.compact? | boolean | When false , each row is separated by a blank line |
commandOptions.nameStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the command/option name |
commandOptions.nameStyle.bold? | boolean | - |
commandOptions.nameStyle.underline? | boolean | - |
commandOptions.nameStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
commandOptions.nameStyle.reset? | boolean | - |
commandOptions.descriptionStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the command/option description |
commandOptions.descriptionStyle.bold? | boolean | - |
commandOptions.descriptionStyle.underline? | boolean | - |
commandOptions.descriptionStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
commandOptions.descriptionStyle.reset? | boolean | - |
commandOptions.namePrefix? | string | Prefix for the command/option name (default is the command's prefix) |
commandOptions.aliasPrefix? | string | Prefix for the command/option aliases (default is the command's prefix) |
optionOptions? | { compact : undefined | boolean ; nameStyle : undefined | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } ; descriptionStyle : undefined | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } ; namePrefix : undefined | string ; aliasPrefix : undefined | string ; displayNegations : undefined | boolean ; displayDefaultValue : undefined | boolean ; defaultValueStyle : undefined | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } } | Options for generating the table of options |
optionOptions.compact | undefined | boolean | - |
optionOptions.nameStyle | undefined | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | - |
optionOptions.descriptionStyle | undefined | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | - |
optionOptions.namePrefix | undefined | string | - |
optionOptions.aliasPrefix | undefined | string | - |
optionOptions.displayNegations | undefined | boolean | - |
optionOptions.displayDefaultValue | undefined | boolean | - |
optionOptions.defaultValueStyle | undefined | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | - |
titleStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the help title |
titleStyle.bold? | boolean | - |
titleStyle.underline? | boolean | - |
titleStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
titleStyle.reset? | boolean | - |
subtitleStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the help subtitles for commands, options and examples |
subtitleStyle.bold? | boolean | - |
subtitleStyle.underline? | boolean | - |
subtitleStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
subtitleStyle.reset? | boolean | - |
usageStyle? | { options? : { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } ; prefix? : { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } ; main? : { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } ; command? : { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } } | Style of the help usage |
usageStyle.options? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the help usage options (if any) |
usageStyle.options.bold? | boolean | - |
usageStyle.options.underline? | boolean | - |
usageStyle.options.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
usageStyle.options.reset? | boolean | - |
usageStyle.prefix? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the help usage title - appears before the usage text (custom or auto) |
usageStyle.prefix.bold? | boolean | - |
usageStyle.prefix.underline? | boolean | - |
usageStyle.prefix.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
usageStyle.prefix.reset? | boolean | - |
usageStyle.main? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | For custom usage text, this is the primary style used (right after the prefix style). For automated usage text, this style is used for the command/binary name |
usageStyle.main.bold? | boolean | - |
usageStyle.main.underline? | boolean | - |
usageStyle.main.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
usageStyle.main.reset? | boolean | - |
usageStyle.command? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the help usage commands (if any) |
usageStyle.command.bold? | boolean | - |
usageStyle.command.underline? | boolean | - |
usageStyle.command.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
usageStyle.command.reset? | boolean | - |
headerStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the help header |
headerStyle.bold? | boolean | - |
headerStyle.underline? | boolean | - |
headerStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
headerStyle.reset? | boolean | - |
footerStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the help footer |
footerStyle.bold? | boolean | - |
footerStyle.underline? | boolean | - |
footerStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
footerStyle.reset? | boolean | - |
exampleOptions? | { compact? : boolean ; descriptionStyle? : { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } ; inputStyle? : { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } ; outputStyle? : { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } ; inputPrefix? : string ; outputPrefix? : string ; prefixStyle? : { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } } | Options for examples section |
exampleOptions.compact? | boolean | Whether to compact the examples section |
exampleOptions.descriptionStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the example description |
exampleOptions.descriptionStyle.bold? | boolean | - |
exampleOptions.descriptionStyle.underline? | boolean | - |
exampleOptions.descriptionStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
exampleOptions.descriptionStyle.reset? | boolean | - |
exampleOptions.inputStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the example input |
exampleOptions.inputStyle.bold? | boolean | - |
exampleOptions.inputStyle.underline? | boolean | - |
exampleOptions.inputStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
exampleOptions.inputStyle.reset? | boolean | - |
exampleOptions.outputStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the example output |
exampleOptions.outputStyle.bold? | boolean | - |
exampleOptions.outputStyle.underline? | boolean | - |
exampleOptions.outputStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
exampleOptions.outputStyle.reset? | boolean | - |
exampleOptions.inputPrefix? | string | Prefix for the example input (default: $ ) |
exampleOptions.outputPrefix? | string | Prefix for the example output (default: > ) |
exampleOptions.prefixStyle? | { bold? : boolean ; underline? : boolean ; color? : "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset? : boolean } | Style of the example input/output prefixes |
exampleOptions.prefixStyle.bold? | boolean | - |
exampleOptions.prefixStyle.underline? | boolean | - |
exampleOptions.prefixStyle.color? | "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" | - |
exampleOptions.prefixStyle.reset? | boolean | - |
usageText? | string | Text to display at the very top, describing CLI usage |
headerText? | string | Text to display above the description, below the usage |
footerText? | string | Text to display at the very bottom, below the examples |
Defined in
HelpItem
Ƭ HelpItem: Object
Type declaration
Name | Type |
---|---|
name | string |
negationName? | string |
aliases | string [] |
negationAliases? | string [] |
description | string |
hidden? | boolean |
negatable? | boolean |
defaultValue? | any |
Defined in
Variables
GenerateTableCommandConfig
• Const
GenerateTableCommandConfig: ZodObject
<GenerateTableCommandConfig
>
Defined in
GenerateTableOptionConfig
• Const
GenerateTableOptionConfig: ZodObject
<GenerateTableOptionConfig
>
Defined in
HelpConfig
• Const
HelpConfig: ZodObject
<HelpConfig
>
Defined in
defaultHelpConfig
• Const
defaultHelpConfig: DeepRequired
<HelpConfig
>