CLI

class

CLI

source
export class CLI
export class CLI
constructor(options: CLI.Options)
constructor(options: CLI.Options)
ParamTypeRequired
options
options
CLI.Options
CLI.Options
Yes
isDebugging(): boolean
isDebugging(): boolean

Returns:

boolean
boolean

get source

.flags()

flags(): CLI.Flags
flags(): CLI.Flags

Returns:

CLI.Flags
CLI.Flags

public async source

.parse(...)

parse(argv?: string[]): Promise<this>
parse(argv?: string[]): Promise<this>
ParamTypeRequired
argv
argv
string[]
string[]
No

Returns:

Promise<this>
Promise<this>

public async source

.loadCommands()

loadCommands(): Promise<void>
loadCommands(): Promise<void>

Returns:

Promise<void>
Promise<void>

public async source

.handlePreAction(...)

handlePreAction(cmd: Command, action: Command): Promise<void>
handlePreAction(cmd: Command, action: Command): Promise<void>
ParamTypeRequired
cmd
cmd
Command
Command
Yes
action
action
Command
Command
Yes

Returns:

Promise<void>
Promise<void>

public async source

.setCurrentDirectory(...)

setCurrentDirectory(cwd?: string): Promise<void>
setCurrentDirectory(cwd?: string): Promise<void>
ParamTypeRequired
cwd
cwd
string
string
No

Returns:

Promise<void>
Promise<void>

public source

.getFlags(...)

getFlags<Flags extends Record<string, any>>(command: Command|string, mergeDefault?: false): Flags|undefined
getFlags<Flags extends Record<string, any>>(command: Command|string, mergeDefault?: false): Flags|undefined
ParamTypeRequired
command
command
Command|string
Command|string
Yes
mergeDefault
mergeDefault
false
false
No

Returns:

Flags|undefined
Flags|undefined

public source

.getCommand(...)

getCommand(name: string): Command|undefined
getCommand(name: string): Command|undefined
ParamTypeRequired
name
name
string
string
Yes

Returns:

Command|undefined
Command|undefined

public source

.build

string
string
string
string
Command
Command
Logger
Logger