A command-line interface (CLI) created by `Cli`

### Hierarchy

- ICli

## Index

### Methods

- api
- run
- runLine

## Methods

### api

- api(args: string[]): Promise<any>

- - Defined in src/cli-options.ts:13

  Programmatic interface for the CLI, useful for unit testing

  #### Parameters

  - ##### args: string[]

    Command-line argument strings

  #### Returns Promise<any>

  A promise resolving to the command action's return value

### run

- run(args?: string[]): Promise<number>

- - Defined in src/cli-options.ts:21

  Run the command-line interface, console.log the result, and exit

  #### Parameters

  - ##### Optional args: string[]

    Command line arguments parsed and passed into the command action. Defaults to `process.argv.slice(2)` in Node.js.

  #### Returns Promise<number>

  A promise resolving to the command's exit code

### runLine

- runLine(line?: undefined | string): Promise<number>

- - Defined in src/cli-options.ts:28

  Split a command line into args and call `ICli.run`

  #### Parameters

  - ##### Optional line: undefined | string

    A command line

  #### Returns Promise<number>

  A promise resolving to the command's exit code

Generated using TypeDoc and MonoLisa