gunshi / default / CommandEnvironment
Interface: CommandEnvironment<G>
Command environment.
Type Parameters
Type Parameter | Default type |
---|---|
G extends GunshiParams <any > | DefaultGunshiParams |
Properties
Property | Type | Description |
---|---|---|
cwd | undefined | string | Current working directory. See CliOptions.cwd |
description | undefined | string | Command description. See CliOptions.description |
leftMargin | number | Left margin of the command output. Default 2 See CliOptions.leftMargin |
middleMargin | number | Middle margin of the command output. Default 10 See CliOptions.middleMargin |
name | undefined | string | Command name. See CliOptions.name |
renderHeader | undefined | null | (ctx ) => Promise <string > | Render function the header section in the command usage. |
renderUsage | undefined | null | (ctx ) => Promise <string > | Render function the command usage. |
renderValidationErrors | undefined | null | (ctx , error ) => Promise <string > | Render function the validation errors. |
subCommands | | undefined | Map <string , | Command <any > | LazyCommand <any >> | Sub commands. See CliOptions.subCommands |
usageOptionType | boolean | Whether to display the usage option type. Default false See CliOptions.usageOptionType |
usageOptionValue | boolean | Whether to display the option value. Default true See CliOptions.usageOptionValue |
usageSilent | boolean | Whether to display the command usage. Default false See CliOptions.usageSilent |
version | undefined | string | Command version. See CliOptions.version |