Skip to content

gunshi / default / cli

Function: cli()

ts
function cli<Options>(
   args, 
   entry, 
opts): Promise<undefined | string>;

Run the command.

Type Parameters

Type ParameterDefault type
Options extends ArgOptionsArgOptions

Parameters

ParameterTypeDescription
argsstring[]Command line arguments
entry| Command<Options> | CommandRunner<Options>A entry command or an inline command runner
optsCommandOptions<Options>A command options

Returns

Promise<undefined | string>

A rendered usage or undefined. if you will use CommandOptions.usageSilent option, it will return rendered usage string.

Released under the MIT License.