### Hierarchy

- Imperative

## Index

### Properties

- DEFAULT_DEBUG_FILE
- mApi
- mCommandLine
- mConsoleLog
- mFullCommandTree
- mHelpGeneratorFactory
- mRootCommandName

### Accessors

- api
- commandLine
- console
- fullCommandTree
- log
- rootCommandName

### Methods

- addAutoGeneratedCommands
- constructApiObject
- constructAppLoggerApi
- constructConsoleApi
- constructDynamicLoggersApi
- constructImperativeLoggerApi
- defineCommands
- getHelpGenerator
- getPreparedCmdTree
- getProfileConfiguration
- getResolvedCmdTree
- highlightWithPrimaryColor
- highlightWithSecondaryColor
- init
- initAppSettings
- initLogging
- parse

## Properties

### Static Readonly DEFAULT_DEBUG_FILE

DEFAULT_DEBUG_FILE: string = join(process.cwd(), "imperative_debug.log")

- Defined in @zowe/imperative/src/imperative/src/Imperative.ts:67

### Static Private mApi

mApi: ImperativeApi

- Defined in @zowe/imperative/src/imperative/src/Imperative.ts:425

### Static Private mCommandLine

mCommandLine: string

- Defined in @zowe/imperative/src/imperative/src/Imperative.ts:429

### Static Private mConsoleLog

mConsoleLog: Logger

- Defined in @zowe/imperative/src/imperative/src/Imperative.ts:426

### Static Private mFullCommandTree

mFullCommandTree: ICommandDefinition

- Defined in @zowe/imperative/src/imperative/src/Imperative.ts:427

### Static Private mHelpGeneratorFactory

mHelpGeneratorFactory: IHelpGeneratorFactory

- Defined in @zowe/imperative/src/imperative/src/Imperative.ts:430

### Static Private mRootCommandName

mRootCommandName: string

- Defined in @zowe/imperative/src/imperative/src/Imperative.ts:428

## Accessors

### Static api

- get api(): ImperativeApi

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:391

  Returns the imperative API object containing various framework API methods for usage in your CLI implemenation.

  #### Returns ImperativeApi

  : The api object.

### Static commandLine

- get commandLine(): string
- set commandLine(args: string): void

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:85

  Retrieve the command line.

  example

    For example, in "banana a b --c", "a b --c" is the command line.

  #### Returns string

  - command line
- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:94

  Set the command line (needed for daemon where command changes and is not static)

  static
  memberof

    Imperative

  #### Parameters

  - ##### args: string

  #### Returns void

  - command line

### Static console

- get console(): Logger

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:341

  Returns the default console object to be used for messaging for imperative fails to initialize or to be used before logging is initialized.

  #### Returns Logger

  : an instance of the default console object

### Static fullCommandTree

- get fullCommandTree(): ICommandDefinition

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:103

  Get the complete full command tree

  #### Returns ICommandDefinition

### Static Private log

- get log(): Logger

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:435

  Get log instance

  #### Returns Logger

### Static rootCommandName

- get rootCommandName(): string

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:75

  Retrieve the root command name.

  example

    For example, in "banana a b --c", "banana" is the root command name.

  #### Returns string

  - root command name

## Methods

### Static Private addAutoGeneratedCommands

- addAutoGeneratedCommands(rootCommand: ICommandDefinition): ICommandDefinition

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:680

  Append any auto generated commands to the root command document depending on configuration.

  #### Parameters

  - ##### rootCommand: ICommandDefinition

    the root command as built so far

  #### Returns ICommandDefinition

  - the root command with any auto generated commands appended

### Static Private constructApiObject

- constructApiObject(): ImperativeApi

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:588

  Construct the API object for return to caller of init()

  #### Returns ImperativeApi

  : The API object

### Static Private constructAppLoggerApi

- constructAppLoggerApi(): Logger

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:612

  Build the Logger API object for the app using the framework

  #### Returns Logger

  : returns the app Logger API object

### Static Private constructConsoleApi

- constructConsoleApi(): Logger

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:628

  Build the default console API object for the framework

  #### Returns Logger

  : returns the default console Logger API object

### Static Private constructDynamicLoggersApi

- constructDynamicLoggersApi(api: any): any

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:637

  #### Parameters

  - ##### api: any

  #### Returns any

### Static Private constructImperativeLoggerApi

- constructImperativeLoggerApi(): Logger

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:620

  Build the imperative API object for the app using the framework

  #### Returns Logger

  : returns the imperative Logger API object

### Static Private defineCommands

- defineCommands(preparedHostCliCmdTree: ICommandDefinition): void

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:524

  Define to yargs for main CLI and plugins

  #### Parameters

  - ##### preparedHostCliCmdTree: ICommandDefinition

    The Root of the imperative host CLI which has already prepared by ImperativeConfig.getPreparedCmdTree.

  #### Returns void

### Static getHelpGenerator

- getHelpGenerator(parms: IHelpGeneratorParms): IHelpGenerator

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:383

  Get the configured help generator for your CLI. If you have not specified a custom generator, the DefaultHelpGenerator will be used. You probably won't need to call this from your CLI, but it is used internally.

  #### Parameters

  - ##### parms: IHelpGeneratorParms

    parameters to the help generator including command definition

  #### Returns IHelpGenerator

  - The help generator for the command

### Static Private getPreparedCmdTree

- getPreparedCmdTree(resolvedCmdTree: ICommandDefinition, baseProfile?: ICommandProfileTypeConfiguration): ICommandDefinition

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:669

  Get imperative's host CLI command tree after final preparation.

  #### Parameters

  - ##### resolvedCmdTree: ICommandDefinition

    The imperative command tree returned by Imperative.getResolvedCmdTree()

  - ##### Optional baseProfile: ICommandProfileTypeConfiguration

    An optional base profile to add to command definitions

  #### Returns ICommandDefinition

### Static getProfileConfiguration

- getProfileConfiguration(type: string): ICommandProfileTypeConfiguration | undefined

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:362

  #### Parameters

  - ##### type: string

    the profile type to search for configuration for

  #### Returns ICommandProfileTypeConfiguration | undefined

  The profile configuration if found, otherwise, undefined.

### Static Private getResolvedCmdTree

- getResolvedCmdTree(config: IImperativeConfig): ICommandDefinition

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:653

  Get imperative's host CLI command tree with all module globs resolved.

  #### Parameters

  - ##### config: IImperativeConfig

  #### Returns ICommandDefinition

  The resolved command tree

### Static highlightWithPrimaryColor

- highlightWithPrimaryColor(text: string): string

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:412

  Highlight text with your configured (or default) primary color

  #### Parameters

  - ##### text: string

    the text to highlight

  #### Returns string

  - the highlighted text

### Static highlightWithSecondaryColor

- highlightWithSecondaryColor(text: string): string

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:421

  Highlight text with your configured (or default) secondary color

  #### Parameters

  - ##### text: string

    the text to highlight

  #### Returns string

  - the highlighted text

### Static init

- init(config?: IImperativeConfig): Promise<void>

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:121

  Initialize the configuration for your CLI. Wipes out any existing config that has already been set.

  #### Parameters

  - ##### Optional config: IImperativeConfig

  #### Returns Promise<void>

  A promise indicating that we are done here.

### Static Private initAppSettings

- initAppSettings(): void

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:443

  Load the correct AppSettings instance from values located in the cli home folder.

  #### Returns void

### Static Private initLogging

- initLogging(): void

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:465

  Init log object such that subsequent calls to the Logger.getImperativeLogger() (or other similar calls), will contain all necessary categories for logging.

  TODO(Kelosky): handle level setting via global config (trace enabling and such)

  #### Returns void

### Static parse

- parse(args?: string | string[], context?: IDaemonContext): Imperative

- - Defined in @zowe/imperative/src/imperative/src/Imperative.ts:350

  Parse command line arguments and issue the user's specified command

  #### Parameters

  - ##### Optional args: string | string[]

  - ##### Optional context: IDaemonContext

  #### Returns Imperative

  this, for chaining syntax

Generated using TypeDoc