Skip to content

DeriveParams ​

The bag of values received by a derive handler.

Identical to ActionParams: derives run after full resolution and before the action handler, with typed args, flags, provenance, and current context plus out and meta.

Signatures ​

ts
type DeriveParams<F extends Record<string, FlagBuilder<FlagConfig>>, A extends Record<string, ArgBuilder<ArgConfig>>, C extends Record<string, unknown>> = ActionParams<F, A, C>;

Members ​

Members ​

args ​

Fully resolved positional argument values, typed from .arg() definitions.

ts
args: Readonly<InferArgs<A>>;

flags ​

Fully resolved flag values, typed from .flag() definitions.

ts
flags: Readonly<InferFlags<F>>;

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.

ts
sources: InputSources<F, A>;

parse ​

Flag spellings observed in this command invocation.

ts
parse: ParseContext;

ctx ​

Middleware/derive-provided context, typed from .middleware() and .derive() chains.

ts
ctx: Readonly<C>;

out ​

Structured output channel for stdout, stderr, JSON, tables, and spinners.

ts
out: Out;

ask ​

Ask a typed question after selecting the operation or receiving a server challenge.

ts
ask: Ask;

meta ​

Runtime metadata about the CLI program and current command.

ts
meta: CommandMeta;

See Also ​

Released under the MIT License.