Skip to main content

CommandMetadata

Hierarchy

Index

Properties

aliases

aliases: string[]

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

allowUnknownOptions

allowUnknownOptions: boolean

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

allowVariadicParams

allowVariadicParams: string | boolean

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

categories

categories: Categories

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

category

category: string

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

commands

commands: Record<string, Commandable<any, any[]>>

deprecated

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.

optionalhasRegisteredOptions

hasRegisteredOptions?: string

hidden

hidden: boolean

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

options

A mapping of options to their configurations.

params

A list of param (positional args) configurations.

path

path: string

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

usage

usage: string | string[]

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