ActionParams
The bag of values received by an action handler.
args: fully resolved positional argumentsflags: fully resolved flagssources: which stage produced each of those valuesctx: derive/middleware-provided contextout: output channelmeta: CLI program metadata (name, bin, version, command)
The C parameter defaults to Record<string, never>, making ctx property access a type error until derive or middleware extends it.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/schema/command.ts - Source link:
src/core/schema/command.ts:363
Signatures
interface ActionParams<F extends Record<string, FlagBuilder<FlagConfig>>, A extends Record<string, ArgBuilder<ArgConfig>>, C extends Record<string, unknown>> {}Members
Properties
args
Fully resolved positional argument values, typed from .arg() definitions.
args: Readonly<InferArgs<ActionParams.A>>;ask
Ask a typed question after selecting the operation or receiving a server challenge.
ask: Ask;ctx
Middleware/derive-provided context, typed from .middleware() and .derive() chains.
ctx: Readonly<ActionParams.C>;flags
Fully resolved flag values, typed from .flag() definitions.
flags: Readonly<InferFlags<ActionParams.F>>;meta
Runtime metadata about the CLI program and current command.
meta: CommandMeta;out
Structured output channel for stdout, stderr, JSON, tables, and spinners.
out: Out;sources
Where each resolved value came from, keyed like flags and args.
An input that resolved no value has no record. wasExplicit answers the explicit-versus-defaulted question; read stage for the rest.
sources: InputSources<ActionParams.F, ActionParams.A>;