Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ICli

Hierarchy

  • ICli

Index

Properties

Properties

config

config: IConfig

Current loaded configuration.

log

log: Logger<Level> & LogMethods<Logger<Level>, Level>

Built in logger.

menu

menu: { buildCommands: any; buildExamples: any; buildOptions: any; combineItems: any }

Helpers for building simple menus.

Type declaration

  • buildCommands: function
    • Builds simple string for help menu.

      Parameters

      • obj: IMap<ICommand> | ICommand[] | ICommandItem[]

        object of commands or array of options to build menu for.

      • Optional name: string
      • Optional tabs: number

        the number of tabs after key name.

      Returns string

  • buildExamples: function
    • buildExamples(examples: string[], name?: string): string
    • Formats example menu items replacing {{name}} with provided value.

      Parameters

      • examples: string[]

        array of examples for help menu.

      • Optional name: string

        the name to replace {{name}} with.

      Returns string

  • buildOptions: function
    • Builds simple string for help menu.

      Parameters

      • obj: IMap<ICommand> | ICommand[] | ICommandItem[]

        object of commands or array of options to build menu for.

      • Optional name: string
      • Optional tabs: number

        the number of tabs after key name.

      Returns string

  • combineItems: function
    • Combines a nested command key into single array.

      Type parameters

      • T

      Parameters

      • obj: IMap<ICommand>

        object containing commands.

      • key: keyof ICommand

        the nested array key to reduce.

      • Optional filter: string[]

        array of commands to filter.

      Returns T[]

pargs

pargs: IKawkahParserResult

Parsed arguments from the command line.

runner

runner: IRunner

Runs spawn and spawnSync.

Generated using TypeDoc