CommandDefinition
Input shape accepted by createCommandSchema.
Every field except name is optional. Flags, args, and subcommands accept either definitions or already-built schemas.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/schema/command.ts - Source link:
src/core/schema/command.ts:642
Signatures
interface CommandDefinition {}Members
Properties
name
The command name used for dispatch.
name: string;description
Human-readable description for help text.
description?: string | undefined;details
Longer explanation shown only in this command's help.
details?: HelpDescription | undefined;aliases
Alternative names for this command.
aliases?: readonly string[] | undefined;hidden
Whether this command is hidden from help listings.
hidden?: boolean | undefined;examples
Usage examples for help text.
examples?: readonly CommandExample[] | undefined;flags
Flag definitions or built schemas, keyed by flag name.
flags?: Readonly<Record<string, FlagDefinition | FlagSchema>> | undefined;flagDeclarationOrder
Explicit declaration order for named flags. Unlisted flags follow in record order.
flagDeclarationOrder?: readonly string[] | undefined;helpTopics
Text-help topic names mapped to flag group names.
helpTopics?: Readonly<Record<string, string>> | undefined;args
Ordered positional arg entries.
args?: readonly CommandArgEntryDefinition[] | undefined;constraints
Relationships checked after input resolution.
constraints?: readonly CommandConstraint[] | undefined;validators
Object validators run after resolution. @internal
validators?: readonly CommandValidator[] | undefined;hasAction
Whether an action handler has been registered.
hasAction?: boolean | undefined;interactive
Command-level interactive resolver.
interactive?: ErasedInteractiveResolver | undefined;commands
Nested subcommand definitions or built schemas.
commands?: readonly (CommandDefinition | CommandSchema)[] | undefined;