Skip to main content

CommandConfig

Hierarchy

  • Command
    • CommandConfig

Index

Properties

optionalaliases

aliases?: string[]

A list of aliased paths. Will not show up in the help menu, but will match on the command line.

optionalallowUnknownOptions

allowUnknownOptions?: boolean

Allow unknown options to be parsed, otherwise an error is thrown. Defaults to false.

optionalallowVariadicParams

allowVariadicParams?: string | boolean

Allow variadic params to be parsed, otherwise an error is thrown. Defaults to false.

optionalcategories

categories?: Categories

A mapping of sub-command and option categories for this command only. Global options are automatically defined under the global category.

optionalcategory

category?: string

The category this object belongs to. Will be used to group in the parent command or program. Defaults to no category.

optionaldeprecated

deprecated?: boolean

Whether the object is deprecated or not. Will display a tag in the help menu. Defaults to false.

description

description: string

A description of what the object is and does. Supports basic markdown for bold, italics, and underline.

optionalhidden

hidden?: boolean

Whether the object should be hidden from the help menu or not. Will still match on the command line. Defaults to false.

optionaloptions

options?: OptionConfigMap

A mapping of options to their configurations.

optionalparams

A list of param (positional args) configurations.

optionalpath

path?: string

A unique name in which to match the command on the command line amongst a list of arguments (argv).

optionalusage

usage?: string | string[]

Define one or many usage examples to display in the help menu.