Skip to main content

Module: help

Classes

Type Aliases

GenerateTableCommandConfig

Ƭ GenerateTableCommandConfig: Object

Type declaration

NameTypeDescription
lineLength?numberLength of each row in the table
compact?booleanWhen 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?stringPrefix for the command/option name (default is the command's prefix)
aliasPrefix?stringPrefix for the command/option aliases (default is the command's prefix)

Defined in

src/help.ts:7

src/help.ts:21


GenerateTableOptionConfig

Ƭ GenerateTableOptionConfig: Object

Type declaration

NameType
lineLengthundefined | number
compactundefined | boolean
nameStyleundefined | { bold?: boolean ; underline?: boolean ; color?: "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset?: boolean }
descriptionStyleundefined | { bold?: boolean ; underline?: boolean ; color?: "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset?: boolean }
namePrefixundefined | string
aliasPrefixundefined | string
displayNegationsundefined | boolean
displayDefaultValueundefined | boolean
defaultValueStyleundefined | { 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

src/help.ts:23

src/help.ts:33


HelpConfig

Ƭ HelpConfig: Object

Type declaration

NameTypeDescription
lineLength?numberMaximum 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?booleanWhether to bind the help command to this command Set this to true to automatically add a help command to this command's subcommands.
bindOption?booleanWhether to bind the help option to this command Set this to true to automatically add a --help option to this command's options.
useGlobalTableColumns?booleanWhether 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?booleanWhen 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?stringPrefix for the command/option name (default is the command's prefix)
commandOptions.aliasPrefix?stringPrefix 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.compactundefined | boolean-
optionOptions.nameStyleundefined | { bold?: boolean ; underline?: boolean ; color?: "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset?: boolean }-
optionOptions.descriptionStyleundefined | { bold?: boolean ; underline?: boolean ; color?: "red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray" | "grey" | "brightRed" | "brightGreen" | "brightYellow" | "brightBlue" | "brightMagenta" | "brightCyan" | "brightWhite" ; reset?: boolean }-
optionOptions.namePrefixundefined | string-
optionOptions.aliasPrefixundefined | string-
optionOptions.displayNegationsundefined | boolean-
optionOptions.displayDefaultValueundefined | boolean-
optionOptions.defaultValueStyleundefined | { 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?booleanWhether 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?stringPrefix for the example input (default: $)
exampleOptions.outputPrefix?stringPrefix 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?stringText to display at the very top, describing CLI usage
headerText?stringText to display above the description, below the usage
footerText?stringText to display at the very bottom, below the examples

Defined in

src/help.ts:35

src/help.ts:113


HelpItem

Ƭ HelpItem: Object

Type declaration

NameType
namestring
negationName?string
aliasesstring[]
negationAliases?string[]
descriptionstring
hidden?boolean
negatable?boolean
defaultValue?any

Defined in

src/help.ts:193

Variables

GenerateTableCommandConfig

Const GenerateTableCommandConfig: ZodObject<GenerateTableCommandConfig>

Defined in

src/help.ts:7

src/help.ts:21


GenerateTableOptionConfig

Const GenerateTableOptionConfig: ZodObject<GenerateTableOptionConfig>

Defined in

src/help.ts:23

src/help.ts:33


HelpConfig

Const HelpConfig: ZodObject<HelpConfig>

Defined in

src/help.ts:35

src/help.ts:113


defaultHelpConfig

Const defaultHelpConfig: DeepRequired<HelpConfig>

Defined in

src/help.ts:115