flag
Flag schema factory. Call flag.<kind>() to create an immutable FlagBuilder with full type inference and safe modifier chaining.
- Import:
@kjanat/dreamcli - Export kind: constant
- Declared in:
src/core/schema/flag.ts - Source link:
src/core/schema/flag.ts:1433
Signatures
ts
const flag: FlagFactory;Related Examples
- Basic single-command CLI. -
examples/basic.ts - The v3 flag-type family in one command. -
examples/flag-types.ts - Help rendering configuration. -
examples/help-config.ts - Interactive prompts with config file fallback. -
examples/interactive.ts - Mixed machine-readable JSON and human-readable side-channel output. -
examples/json-mode.ts - Middleware patterns: auth guard, request timing, error handling. -
examples/middleware.ts - Multi-command CLI with nested command groups (git-like). -
examples/multi-command.ts - Parser-level controls: negation, duplicate policy, and spelling parity. -
examples/parser-control.ts - Spinner and progress bar usage. -
examples/spinner-progress.ts - Standard Schema validation for custom flags and args. -
examples/standard-schema.ts - Testing examples using @kjanat/dreamcli/testkit. -
examples/testing.ts - Single-transport launcher (language-server style). -
examples/transport-launcher.ts