Skip to content

gunshi / default / CliOptions

Interface: CliOptions<G>

CLI options of cli function.

Type Parameters

Type ParameterDefault type
G extends GunshiParams<any>DefaultGunshiParams

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 optional argument type.
usageOptionValue?booleanWhether to display the optional argument value.
usageSilent?booleanWhether to display the command usage.
version?stringCommand program version.

Released under the MIT License.