CommandSchema
Runtime descriptor produced by CommandBuilder.
Consumers (parser, help generator, CLI dispatcher) read this to understand the command's shape — flags, args, aliases, subcommands, and interactive resolver.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/schema/command.ts - Source link:
src/core/schema/command.ts:518
Signatures
interface CommandSchema {}Members
Properties
[schemaBrand]
Type-only seal produced by createCommandSchema.
[schemaBrand]: "command";aliases
Alternative names for this command.
aliases: readonly string[];args
Ordered positional arg entries (name + schema).
args: readonly CommandArgEntry[];commands
Nested subcommand schemas (for help rendering and completion).
Pure data — no execution closures. Populated by .command() on CommandBuilder. Empty for leaf commands.
commands: readonly CommandSchema[];description
Human-readable description for help text.
description: string | undefined;examples
Usage examples for help text.
examples: readonly CommandExample[];flags
Named flag schemas, keyed by flag name.
flags: Readonly<Record<string, FlagSchema>>;hasAction
Whether an action handler has been registered.
hasAction: boolean;hidden
Whether this command is hidden from help listings.
hidden: boolean;interactive
Command-level interactive resolver for schema-driven prompt control.
When set, called after CLI/env/config resolution with partially resolved flag values. Returns prompt configs for flags that need interactive input. Takes precedence over per-flag .prompt() configs for flags it returns configs for; flags not mentioned fall back to their per-flag configs.
interactive: ErasedInteractiveResolver | undefined;name
The command name (used for dispatch, e.g. 'deploy').
name: string;