Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CLI

Create a new ActionHero CLI Command. The required properties of an CLI command. These can be defined statically (this.name) or as methods which return a value.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • new CLI(): CLI

Properties

description

description: string

The description of the CLI command (default this.name)

example

example: string

An example of how to run this CLI command

inputs

inputs: object

The inputs of the CLI command (default: {})

Type declaration

  • [key: string]: any

name

name: string

The name of the CLI command.

Methods

Private getDefaults

  • getDefaults(): object
  • Returns object

    • description: string
    • example: string
    • inputs: object
    • name: null

Abstract run

  • run(data: object): Promise<boolean>
  • The main "do something" method for this CLI command. It is an async method. If error is thrown in this method, it will be logged to STDERR, and the process will terminate with a non-0 exit code.

    Parameters

    • data: object
      • [key: string]: any

    Returns Promise<boolean>

validate

  • validate(): void

Generated using TypeDoc