Skip to content

gunshi / default / cli

Function: cli()

ts
function cli<A>(
   argv, 
   entry, 
options): Promise<undefined | string>;

Run the command.

Type Parameters

Type ParameterDefault type
A extends ArgsArgs

Parameters

ParameterTypeDescription
argvstring[]-
entry| Command<A> | CommandRunner<A> | LazyCommand<A>A entry command, an inline command runner, or a lazily-loaded command
optionsCliOptions<A>A CLI options

Returns

Promise<undefined | string>

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

Released under the MIT License.