Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CommandConfig

Hierarchy

  • CommandConfig

Index

Properties

Optional action

action: Function | string

Defaults to 'handle' and refers to the function name in the class that should be called. It can also be a function, which can replace the need of using a class

Optional alias

alias: string

[optional] alias that can be used instead of the name

Optional alwaysRun

alwaysRun: null | string

Optional arguments

Optional argv

argv: string[]

Optional cls

cls: Function

Optional description

description: string

Brief description of the command / group

Optional enabled

Commands can be disabled by setting this on false or passing a callback that returns a boolean value

Optional example

example: string

[optional] Can be used to show some examples

Optional explanation

explanation: string

[optional] long description of the command / group

Optional filePath

filePath: string

Optional group

group: string | null

Optional helpers

helpers: object

Type declaration

Optional isGroup

isGroup: boolean

If enabled the command will be treated as a group. The Cli will try and locate sub-commands.

Optional name

name: string

The name of the command. This will be checked and purged for argument definitions.

Optional onMissingArgument

onMissingArgument: string | "fail" | "handle"

Optional options

options: OptionConfig[]

Optional subCommands

Optional usage

usage: string | null

[auto/optional] Describes the input of the command. This is auto-generated if not defined

Generated using TypeDoc