Skip to content

gunshi / generator / generate

Function: generate()

ts
function generate<G>(
   command, 
   entry, 
options): Promise<string>;

Generate the command usage.

Type Parameters

Type ParameterDefault type
G extends GunshiParams<any>DefaultGunshiParams

Parameters

ParameterTypeDescription
commandnull | stringusage generate command, if you want to generate the usage of the default command where there are target commands and sub-commands, specify null.
entry| Command<G> | LazyCommand<G>A entry command
optionsGenerateOptions<G>A cli options

Returns

Promise<string>

A rendered usage.

Released under the MIT License.