Skip to content

CommandDefinitionFragmentV1

A command nested inside a definition document.

Fragments carry no schemaVersion. They inherit the version of the document they sit in. The standalone form is CommandDefinitionDocumentV1.

Signatures

ts
type CommandDefinitionFragmentV1 = unknown;

Members

Properties

aliases

Alternative names accepted for this command.

ts
aliases?: readonly string[];

args

Positional argument definitions in CLI order.

ts
args: readonly ArgDefinitionFragmentV1[];

commands

Nested subcommand definitions.

ts
commands: readonly CommandDefinitionFragmentV1[];

description

Human-readable description for help text.

ts
description?: string;

examples

Usage examples attached to the command.

ts
examples?: readonly ExampleDefinitionFragmentV1[];

flags

Named flag definitions keyed by flag name.

ts
flags: Readonly<Record<string, FlagDefinitionFragmentV1>>;

hidden

Whether the command is omitted from help listings.

ts
hidden?: true;

name

The command name used for dispatch.

ts
name: string;

See Also

Released under the MIT License.