FlagSchema
The runtime descriptor stored inside every FlagBuilder. Consumers (parser, help generator, resolution chain) read this to understand the flag's shape without touching generics.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/schema/flag.ts - Source link:
packages/dreamcli/src/core/schema/flag.ts:119
Signatures
interface FlagSchema {}Members
Properties
aliases
Short/long aliases (e.g. [{ name: 'f', hidden: false }] for --force).
aliases: readonly FlagAlias[];configPath
Dotted config path for v0.2+ resolution (e.g. 'deploy.region').
configPath: string | undefined;defaultValue
Runtime default value (if any).
defaultValue: unknown;deprecated
Deprecation marker.
undefined— not deprecated (default)true— deprecated with no migration messagestring— deprecated with a reason/migration message
When a deprecated flag is used, a warning is emitted to stderr. Help text shows [deprecated] or [deprecated: <reason>].
deprecated: string | true | undefined;description
Human-readable description for help text.
description: string | undefined;elementSchema
Element schema when kind === 'array'.
elementSchema: FlagSchema | undefined;enumValues
Allowed literal values when kind === 'enum'.
enumValues: readonly string[] | undefined;envVar
Environment variable name for v0.2+ resolution.
envVar: string | undefined;kind
What kind of value this flag accepts.
kind: "string" | "number" | "boolean" | "enum" | "array" | "custom";parseFn
Custom parse function (only when kind === 'custom').
parseFn: FlagParseFn<unknown> | undefined;presence
Current presence state.
presence: "optional" | "required" | "defaulted";prompt
Interactive prompt configuration for v0.3+ resolution.
prompt: PromptConfig | undefined;propagate
Whether this flag propagates to subcommands in nested command trees.
When true, the flag is automatically available to all descendant commands. A child command that defines a flag with the same name shadows the propagated parent flag.
propagate: boolean;