Interface UsageOpts

interface UsageOpts {
    color: boolean | Partial<ColorTheme>;
    groups: string[];
    lineWidth: number;
    paramWidth: number;
    prefix: string;
    showDefaults: boolean;
    showGroupNames: boolean;
    suffix: string;
}

Properties

color: boolean | Partial<ColorTheme>

If false, ANSI colors will be stripped from output.

Remarks

When using cliApp, the default for this value will depend on the NO_COLOR env var being set. See https://no-color.org/ for details.

Default Value

true
groups: string[]

Defines output order of arg groups. By default args belong to either "main" or "flag" groups. Each group's args are output in alphabetical order. Groups are separated by an empty line.

Default Value

["flags", "main"]

lineWidth: number

Line width for usage information (used for word wrapping).

Default Value

80
paramWidth: number

Column width for params

Default Value

32
prefix: string

Prefix content to show before list of options. Can contain ANSI control seqs and will be automatically word wrapped to given lineWidth.

Default

empty string
showDefaults: boolean

If true (default), display argument default values. Nullish or false default values will never be shown.

Default Value

true
showGroupNames: boolean

If true, displays group names as sub headings.

Default Value

false
suffix: string

Suffix content to show after list of options. Can contain ANSI control seqs and will be automatically word wrapped to given lineWidth.

Default

empty string

Generated using TypeDoc