InputPromptConfig
Free-text input prompt — maps to string and number flags. Part of PromptConfig.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/schema/prompt.ts - Source link:
src/core/schema/prompt.ts:51
Signatures
interface InputPromptConfig extends PromptConfigBase {}Members
Properties
kind
Discriminator identifying this as a free-text input prompt.
kind: "input";placeholder
Placeholder text shown before user types (informational only).
placeholder?: string;trim
Trim surrounding whitespace. Defaults to true for compatibility.
trim?: boolean;empty
Empty submission policy. Defaults to skip (fall through to input defaults).
empty?: "skip" | "accept" | "retry";default
Value used when the user submits an empty line (presses Enter), shown in the hint as (default: <value>). When set, an empty submission resolves to this value without running validate. When omitted, an empty submission is treated as "no answer" so resolution falls through to the flag's .default().
default?: string;validate
Inline validation function. Return true if valid, or a string error message if invalid. Called before coercion to flag kind.
validate?: { (value: string): true | string | Promise<true | string>; };message
The question displayed to the user.
message: string;sensitive
Suppress framework-controlled value hints and diagnostics.
sensitive?: boolean;