• Public
  • Public/Protected
  • All

Class CLI Abstract

An Actionhero CLI Command. For inputs, you can provide Options (--thing=stuff) with the "Inputs" object, or define Arguments in the name of the command (greet [name])


  • CLI




description: string

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

example: string

An example of how to run this CLI command

initialize: boolean

Should the server initialize before running this command?

inputs: {}

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

Type declaration

  • [key: string]: { default?: string | boolean; description?: string; flag?: boolean; formatter?: Function; letter?: string; placeholder?: string; required?: boolean; requiredValue?: boolean; validator?: Function; variadic?: boolean }
    • Optional default?: string | boolean
    • Optional description?: string
    • Optional flag?: boolean
    • Optional formatter?: Function
    • Optional letter?: string
    • Optional placeholder?: string
    • Optional required?: boolean
    • Optional requiredValue?: boolean
    • Optional validator?: Function
    • Optional variadic?: boolean
name: string

The name of the CLI command.

start: boolean

Should the server start before running this command?


  • help(): void
  • An optional method to append additional information to the --help response for this CLI command

    Returns void

  • run(data: {}): 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.


    • data: {}
      • [key: string]: any

    Returns Promise<boolean>

  • validate(): void

Generated using TypeDoc