Skip to content

gunshi / default / CommandOptions

Interface: CommandOptions<Options>

Command options.

Type Parameters

Type ParameterDefault type
Options extends ArgOptionsArgOptions

Properties

PropertyTypeDescription
cwd?stringCurrent working directory.
description?stringCommand program description.
leftMargin?numberLeft margin of the command output.
locale?string | LocaleCommand program locale.
middleMargin?numberMiddle margin of the command output.
name?stringCommand program name.
renderHeader?null | (ctx) => Promise<string>Render function the header section in the command usage.
renderUsage?null | (ctx) => Promise<string>Render function the command usage.
renderValidationErrors?null | (ctx, error) => Promise<string>Render function the validation errors.
subCommands?Map<string, | Command<any> | LazyCommand<any>>Sub commands.
translationAdapterFactory?TranslationAdapterFactoryTranslation adapter factory.
usageOptionType?booleanWhether to display the usage option type.
usageSilent?booleanWhether to display the command usage.
version?stringCommand program version.

Released under the MIT License.