Skip to content

HelpConfig ​

Consumer-facing root-help configuration set via CLIBuilder.help.

Every field is optional; unset fields fall back to built-in defaults and may be overridden per call through runtime options.help.

Signatures ​

ts
interface HelpConfig {}

Members ​

Properties ​

inlineDefault ​

Render the default command's arguments and flags inline at the root.

ts
inlineDefault?: boolean;

showDefaultInCommands ​

Also list the default command in the root Commands: table.

By default the default command is the root surface and is omitted from the command list (its args/flags render inline instead).

ts
showDefaultInCommands?: boolean;

Show the Run '<bin> <command> --help' for more information. hint.

Defaults to showing the hint only when visible subcommands exist.

ts
footer?: boolean;

width ​

Maximum line width (columns).

ts
width?: number;

Emit OSC 8 hyperlinks in the header when supported.

ts
hyperlinks?: boolean;

outputFlags ​

Apply explicit always, never, or auto values from these long flags to native help.

ts
outputFlags?: HelpOutputFlags;

commandHeader ​

Show the program and version header on command and topic help, using .links() targets.

ts
commandHeader?: boolean;

flagOrder ​

Order of flags within each help section.

  • 'alphabetical' — short-aliased flags first, then alphabetical by name.
  • 'declaration' — the order .flag() was called.

Ignored when HelpConfig.sortFlags is set.

ts
flagOrder?: "alphabetical" | "declaration";

sortFlags ​

Custom comparator over flag long names within each help section. When set, it wins over HelpConfig.flagOrder.

ts
sortFlags?: { (a: string, b: string): number; };

groupOrder ​

Named argument and flag groups to show first, in order. Remaining named groups follow declaration order within each input kind.

ts
groupOrder?: readonly string[];

flagSpelling ​

Spelling of long flag names, aliases, and negations in the Flags: table.

'kebab' shows --wasm-path for a flag keyed wasmPath while handlers keep reading flags.wasmPath. A spelling stays as declared when the parser would not accept its kebab form for the same flag, such as under cli(name, { flags: { caseParity: false } }).

ts
flagSpelling?: "declared" | "kebab";

theme ​

Theme overrides for help output, merged over the built-in theme.

The factory receives the gated ansispeck palette (same instance as out.color), so overrides follow the output channel's color policy. It is never invoked when color is off — themed help cannot leak escapes into piped, --json, or NO_COLOR output.

ts
theme?: HelpThemeFactory;

descriptionTheme ​

Theme overrides used only by function-form flag and argument descriptions. Each supplied role merges over the resolved global theme.

ts
descriptionTheme?: HelpThemeFactory;

See Also ​

Released under the MIT License.