Function: cli()
Run the command.
Param
Command line arguments
Param
A entry command, an inline command runner, or a lazily-loaded command
Param
Call Signature
ts
function cli<A, G>(
argv,
entry,
options?): Promise<undefined | string>;Run the command.
Type Parameters
| Type Parameter | Default type |
|---|---|
A extends Args | Args |
G extends GunshiParams<{ args: Args; extensions: { }; }> | object |
Parameters
| Parameter | Type | Description |
|---|---|---|
argv | string[] | - |
entry | | Command<G> | CommandRunner<G> | LazyCommand<G> | A entry command, an inline command runner, or a lazily-loaded command |
options? | CliOptions<G> | 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.
Call Signature
ts
function cli<E, G>(
argv,
entry,
options?): Promise<undefined | string>;Run the command.
Type Parameters
| Type Parameter | Default type |
|---|---|
E extends ExtendContext | ExtendContext |
G extends GunshiParams<{ args: Args; extensions: { }; }> | object |
Parameters
| Parameter | Type | Description |
|---|---|---|
argv | string[] | - |
entry | | Command<G> | CommandRunner<G> | LazyCommand<G> | A entry command, an inline command runner, or a lazily-loaded command |
options? | CliOptions<G> | 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.
Call Signature
ts
function cli<G>(
argv,
entry,
options?): Promise<undefined | string>;Run the command.
Type Parameters
| Type Parameter | Default type |
|---|---|
G extends GunshiParams<{ args: Args; extensions: { }; }> | DefaultGunshiParams |
Parameters
| Parameter | Type | Description |
|---|---|---|
argv | string[] | - |
entry | | Command<G> | CommandRunner<G> | LazyCommand<G> | A entry command, an inline command runner, or a lazily-loaded command |
options? | CliOptions<G> | 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.
