Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICli

A command-line interface (CLI) created by Cli

Hierarchy

  • ICli

Index

Methods

Methods

api

  • api(args: string[]): Promise<any>
  • 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>
  • 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>
  • 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