Skip to main content Link Search Menu Expand Document (external link)

CliConfig overview

Added in v1.0.0


Table of contents


constructors

defaultConfig

Signature

export declare const defaultConfig: CliConfig

Added in v1.0.0

make

Signature

export declare const make: (params: Partial<CliConfig>) => CliConfig

Added in v1.0.0

context

CliConfig

Signature

export declare const CliConfig: Context.Tag<CliConfig, CliConfig>

Added in v1.0.0

defaultLayer

Signature

export declare const defaultLayer: Layer.Layer<CliConfig>

Added in v1.0.0

layer

Signature

export declare const layer: (config?: Partial<CliConfig>) => Layer.Layer<CliConfig>

Added in v1.0.0

models

CliConfig (interface)

Represents how arguments from the command-line are to be parsed.

Signature

export interface CliConfig {
  /**
   * Whether or not the argument parser should be case sensitive.
   *
   * Defaults to `false`.
   */
  readonly isCaseSensitive: boolean
  /**
   * Levenstein distance threshold for when to show auto correct suggestions.
   *
   * Defaults to `2`.
   */
  readonly autoCorrectLimit: number
  /**
   * Whether or not to perform a final check of the command-line arguments for
   * a built-in option, even if the provided command is not valid.
   *
   * Defaults to `false`.
   */
  readonly finalCheckBuiltIn: boolean
  /**
   * Whether or not to display all the names of an option in the usage of a
   * particular command.
   *
   * Defaults to `true`.
   */
  readonly showAllNames: boolean
  /**
   * Whether or not to display built-in options in the help documentation
   * generated for a `Command`.
   *
   * Defaults to `true`.
   */
  readonly showBuiltIns: boolean
  /**
   * Whether or not to display the type of an option in the usage of a
   * particular command.
   *
   * Defaults to `true`.
   */
  readonly showTypes: boolean
}

Added in v1.0.0

utilities

normalizeCase

Signature

export declare const normalizeCase: {
  (text: string): (self: CliConfig) => string
  (self: CliConfig, text: string): string
}

Added in v1.0.0