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.
- Import:
@kjanat/dreamcli - Export kind: type
- Declared in:
src/core/json-schema/index.ts - Source link:
src/core/json-schema/index.ts:381
Signatures
ts
type CommandDefinitionFragmentV1 = { name: string; description?: string; details?: string; aliases?: readonly string[]; hidden?: true; examples?: readonly ExampleDefinitionFragmentV1[]; flags: Readonly<Record<string, FlagDefinitionFragmentV1>>; flagDeclarationOrder?: readonly string[]; args: readonly ArgDefinitionFragmentV1[]; constraints?: readonly CommandConstraint[]; commands: readonly CommandDefinitionFragmentV1[]; };Members
Members
name
The command name used for dispatch.
ts
name: string;description
Human-readable description for help text.
ts
description?: string;details
Longer explanation shown only in this command's help.
ts
details?: string;aliases
Alternative names accepted for this command.
ts
aliases?: readonly string[];hidden
Whether the command is omitted from help listings.
ts
hidden?: true;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>>;flagDeclarationOrder
Flag declaration order when it differs from the flag record's key order.
ts
flagDeclarationOrder?: readonly string[];args
Positional argument definitions in CLI order.
ts
args: readonly ArgDefinitionFragmentV1[];constraints
Declarative relationships between the command's inputs.
ts
constraints?: readonly CommandConstraint[];commands
Nested subcommand definitions.
ts
commands: readonly CommandDefinitionFragmentV1[];