Skip to content

CLIDefinition

Input shape accepted by createCLISchema.

Every field except name is optional. Commands accept either definitions or already-built schemas. Plugins are execution state and have no definition field.

Signatures

ts
interface CLIDefinition {}

Members

Properties

builtins

Which built-in flags the root keeps.

ts
builtins?: BuiltinsConfig;

commands

Registered command definitions or built schemas, in registration order.

ts
commands?: readonly (CommandSchema | CommandDefinition)[];

completionsFlag

Eager --completions <shell> flag configuration.

ts
completionsFlag?: CompletionsFlagConfig;

configSettings

Config discovery settings, as a definition or an already-built value.

ts
configSettings?: ConfigSettings | ConfigSettingsDefinition;

defaultCommand

Default command dispatched when no subcommand matches.

ts
defaultCommand?: CommandSchema | CommandDefinition;

defaultCommandRouted

Whether the default command is also exposed as a named top-level route.

ts
defaultCommandRouted?: boolean;

description

Program description shown in root help.

ts
description?: string;

flagSettings

Flag-parsing behavior settings.

ts
flagSettings?: ParseOptions;

hasBuiltInCompletions

Whether built-in .completions() registration is active.

ts
hasBuiltInCompletions?: boolean;

helpConfig

Consumer-configured root-help defaults.

ts
helpConfig?: HelpConfig;

OSC 8 hyperlink targets for the root-help header.

ts
helpLinks?: HelpLinks;

inheritName

Whether .run() should replace name with the invoked program name.

ts
inheritName?: boolean;

name

Program name used in help text, usage lines, and completion scripts.

ts
name: string;

packageJsonSettings

Manifest auto-discovery settings.

ts
packageJsonSettings?: ResolvedManifestSettings;

version

Program version shown by --version.

ts
version?: string;

See Also

Released under the MIT License.