### Hierarchy

- Command
  - CommanderStatic

### Indexable

[key: string]: any

## Index

### Constructors

- constructor

### Properties

- Command
- CommandOptions
- Option
- ParseOptionsResult
- args

### Methods

- action
- addListener
- alias
- allowUnknownOption
- arguments
- command
- description
- emit
- eventNames
- getMaxListeners
- help
- listenerCount
- listeners
- name
- off
- on
- once
- option
- opts
- outputHelp
- parse
- parseExpectedArgs
- parseOptions
- prependListener
- prependOnceListener
- rawListeners
- removeAllListeners
- removeListener
- setMaxListeners
- usage
- version

## Constructors

### constructor

- new CommanderStatic(name?: undefined | string): CommanderStatic

- Inherited from Command.constructor

  - Defined in node_modules/commander/typings/index.d.ts:29

  Initialize a new `Command`.

  #### Parameters

  - ##### Optional name: undefined | string

  #### Returns CommanderStatic

## Properties

### Command

Command: Command

- Defined in node_modules/commander/typings/index.d.ts:300

### CommandOptions

CommandOptions: CommandOptions

- Defined in node_modules/commander/typings/index.d.ts:302

### Option

Option: Option

- Defined in node_modules/commander/typings/index.d.ts:301

### ParseOptionsResult

ParseOptionsResult: ParseOptionsResult

- Defined in node_modules/commander/typings/index.d.ts:303

### args

args: string[]

Inherited from Command.args

- Defined in node_modules/commander/typings/index.d.ts:29

## Methods

### action

- action(fn: function): Command

- Inherited from Command.action

  - Defined in node_modules/commander/typings/index.d.ts:143

  Register callback `fn` for the command.

  example

         program
           .command('help')
           .description('display verbose help')
           .action(function() {
              // output help here
           });

  #### Parameters

  - ##### fn: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns Command

  for chaining

### addListener

- addListener(event: string | symbol, listener: function): this

- Inherited from EventEmitter.addListener

  - Defined in node_modules/@types/node/globals.d.ts:579

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### alias

- alias(alias: string): Command
- alias(): string

- Inherited from Command.alias

  - Defined in node_modules/commander/typings/index.d.ts:240

  Set an alias for the command.

  #### Parameters

  - ##### alias: string

  #### Returns Command

- Inherited from Command.alias

  - Defined in node_modules/commander/typings/index.d.ts:241

  #### Returns string

### allowUnknownOption

- allowUnknownOption(arg?: undefined | false | true): Command

- Inherited from Command.allowUnknownOption

  - Defined in node_modules/commander/typings/index.d.ts:200

  Allow unknown options on the command line.

  #### Parameters

  - ##### Optional arg: undefined | false | true

  #### Returns Command

  for chaining

### arguments

- arguments(desc: string): Command

- Inherited from Command.arguments

  - Defined in node_modules/commander/typings/index.d.ts:117

  Define argument syntax for the top-level command.

  #### Parameters

  - ##### desc: string

  #### Returns Command

  for chaining

### command

- command(name: string, desc?: undefined | string, opts?: CommandOptions): Command

- Inherited from Command.command

  - Defined in node_modules/commander/typings/index.d.ts:109

  Add command `name`.

  The `.action()` callback is invoked when the command `name` is specified via ARGV, and the remaining arguments are applied to the function for access.

  When the `name` is "*" an un-matched command will be passed as the first arg, followed by the rest of ARGV remaining.

  example

         program
           .version('0.0.1')
           .option('-C, --chdir <path>', 'change the working directory')
           .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')
           .option('-T, --no-tests', 'ignore test hook')

         program
           .command('setup')
           .description('run remote setup commands')
           .action(function() {
             console.log('setup');
           });

         program
           .command('exec <cmd>')
           .description('run the given remote command')
           .action(function(cmd) {
             console.log('exec "%s"', cmd);
           });

         program
           .command('teardown <dir> [otherDirs...]')
           .description('run teardown commands')
           .action(function(dir, otherDirs) {
             console.log('dir "%s"', dir);
             if (otherDirs) {
               otherDirs.forEach(function (oDir) {
                 console.log('dir "%s"', oDir);
               });
             }
           });

         program
           .command('*')
           .description('deploy the given env')
           .action(function(env) {
             console.log('deploying "%s"', env);
           });

         program.parse(process.argv);

  #### Parameters

  - ##### name: string

  - ##### Optional desc: undefined | string

  - ##### Optional opts: CommandOptions

  #### Returns Command

  the new command

### description

- description(str: string): Command
- description(): string

- Inherited from Command.description

  - Defined in node_modules/commander/typings/index.d.ts:231

  Set the description to `str`.

  #### Parameters

  - ##### str: string

  #### Returns Command

- Inherited from Command.description

  - Defined in node_modules/commander/typings/index.d.ts:232

  #### Returns string

### emit

- emit(event: string | symbol, ...args: any[]): boolean

- Inherited from EventEmitter.emit

  - Defined in node_modules/@types/node/globals.d.ts:589

  #### Parameters

  - ##### event: string | symbol

  - ##### Rest ...args: any[]

  #### Returns boolean

### eventNames

- eventNames(): Array<string | symbol>

- Inherited from EventEmitter.eventNames

  - Defined in node_modules/@types/node/globals.d.ts:594

  #### Returns Array<string | symbol>

### getMaxListeners

- getMaxListeners(): number

- Inherited from EventEmitter.getMaxListeners

  - Defined in node_modules/@types/node/globals.d.ts:586

  #### Returns number

### help

- help(cb?: undefined | function): never

- Inherited from Command.help

  - Defined in node_modules/commander/typings/index.d.ts:278

  Output help information and exit.

  #### Parameters

  - ##### Optional cb: undefined | function

  #### Returns never

### listenerCount

- listenerCount(type: string | symbol): number

- Inherited from EventEmitter.listenerCount

  - Defined in node_modules/@types/node/globals.d.ts:590

  #### Parameters

  - ##### type: string | symbol

  #### Returns number

### listeners

- listeners(event: string | symbol): Function[]

- Inherited from EventEmitter.listeners

  - Defined in node_modules/@types/node/globals.d.ts:587

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### name

- name(str: string): Command
- name(): string

- Inherited from Command.name

  - Defined in node_modules/commander/typings/index.d.ts:258

  Set the name of the command.

  #### Parameters

  - ##### str: string

  #### Returns Command

- Inherited from Command.name

  - Defined in node_modules/commander/typings/index.d.ts:265

  Get the name of the command.

  #### Returns string

### off

- off(event: string | symbol, listener: function): this

- Inherited from EventEmitter.off

  - Defined in node_modules/@types/node/globals.d.ts:583

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### on

- on(event: string | symbol, listener: function): this

- Inherited from EventEmitter.on

  - Defined in node_modules/@types/node/globals.d.ts:580

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### once

- once(event: string | symbol, listener: function): this

- Inherited from EventEmitter.once

  - Defined in node_modules/@types/node/globals.d.ts:581

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### option

- option(flags: string, description?: undefined | string, fn?: function | RegExp, defaultValue?: any): Command
- option(flags: string, description?: undefined | string, defaultValue?: any): Command

- Inherited from Command.option

  - Defined in node_modules/commander/typings/index.d.ts:191

  Define option with `flags`, `description` and optional coercion `fn`.

  The `flags` string should contain both the short and long flags, separated by comma, a pipe or space. The following are all valid all will output this way when `--help` is used.

  "-p, --pepper" "-p|--pepper" "-p --pepper"

  example

        // simple boolean defaulting to false
        program.option('-p, --pepper', 'add pepper');

        --pepper
        program.pepper
        // => Boolean

        // simple boolean defaulting to true
        program.option('-C, --no-cheese', 'remove cheese');

        program.cheese
        // => true

        --no-cheese
        program.cheese
        // => false

        // required argument
        program.option('-C, --chdir <path>', 'change the working directory');

        --chdir /tmp
        program.chdir
        // => "/tmp"

        // optional argument
        program.option('-c, --cheese [type]', 'add cheese [marble]');

  #### Parameters

  - ##### flags: string

  - ##### Optional description: undefined | string

  - ##### Optional fn: function | RegExp

  - ##### Optional defaultValue: any

  #### Returns Command

  for chaining

- Inherited from Command.option

  - Defined in node_modules/commander/typings/index.d.ts:192

  #### Parameters

  - ##### flags: string

  - ##### Optional description: undefined | string

  - ##### Optional defaultValue: any

  #### Returns Command

### opts

- opts(): object

- Inherited from Command.opts

  - Defined in node_modules/commander/typings/index.d.ts:223

  Return an object containing options as key-value pairs

  #### Returns object

  - ##### [key: string]: any

### outputHelp

- outputHelp(cb?: undefined | function): void

- Inherited from Command.outputHelp

  - Defined in node_modules/commander/typings/index.d.ts:272

  Output help information for this command.

  #### Parameters

  - ##### Optional cb: undefined | function

  #### Returns void

### parse

- parse(argv: string[]): Command

- Inherited from Command.parse

  - Defined in node_modules/commander/typings/index.d.ts:208

  Parse `argv`, settings options and invoking commands when defined.

  #### Parameters

  - ##### argv: string[]

  #### Returns Command

  for chaining

### parseExpectedArgs

- parseExpectedArgs(args: string[]): Command

- Inherited from Command.parseExpectedArgs

  - Defined in node_modules/commander/typings/index.d.ts:127

  Parse expected `args`.

  For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`.

  #### Parameters

  - ##### args: string[]

  #### Returns Command

  for chaining

### parseOptions

- parseOptions(argv: string[]): ParseOptionsResult

- Inherited from Command.parseOptions

  - Defined in node_modules/commander/typings/index.d.ts:216

  Parse options from `argv` returning `argv` void of these options.

  #### Parameters

  - ##### argv: string[]

  #### Returns ParseOptionsResult

### prependListener

- prependListener(event: string | symbol, listener: function): this

- Inherited from EventEmitter.prependListener

  - Defined in node_modules/@types/node/globals.d.ts:592

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### prependOnceListener

- prependOnceListener(event: string | symbol, listener: function): this

- Inherited from EventEmitter.prependOnceListener

  - Defined in node_modules/@types/node/globals.d.ts:593

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### rawListeners

- rawListeners(event: string | symbol): Function[]

- Inherited from EventEmitter.rawListeners

  - Defined in node_modules/@types/node/globals.d.ts:588

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### removeAllListeners

- removeAllListeners(event?: string | symbol): this

- Inherited from EventEmitter.removeAllListeners

  - Defined in node_modules/@types/node/globals.d.ts:584

  #### Parameters

  - ##### Optional event: string | symbol

  #### Returns this

### removeListener

- removeListener(event: string | symbol, listener: function): this

- Inherited from EventEmitter.removeListener

  - Defined in node_modules/@types/node/globals.d.ts:582

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### setMaxListeners

- setMaxListeners(n: number): this

- Inherited from EventEmitter.setMaxListeners

  - Defined in node_modules/@types/node/globals.d.ts:585

  #### Parameters

  - ##### n: number

  #### Returns this

### usage

- usage(str: string): Command
- usage(): string

- Inherited from Command.usage

  - Defined in node_modules/commander/typings/index.d.ts:249

  Set or get the command usage.

  #### Parameters

  - ##### str: string

  #### Returns Command

- Inherited from Command.usage

  - Defined in node_modules/commander/typings/index.d.ts:250

  #### Returns string

### version

- version(str: string, flags?: undefined | string): Command

- Inherited from Command.version

  - Defined in node_modules/commander/typings/index.d.ts:48

  Set the program version to `str`.

  This method auto-registers the "-V, --version" flag which will print the version number when passed.

  #### Parameters

  - ##### str: string

  - ##### Optional flags: undefined | string

  #### Returns Command

  for chaining

Generated using TypeDoc