Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/cli / preflightCommand

Function: preflightCommand()

ts
function preflightCommand(argv, context): Promise<number>;

Defined in: packages/cli/src/commands.ts:2005

rulvar preflight (the experiment-review P2.2; grammar in grammar.ts): the effective-config linter and dry-run estimator. Loads the SAME config, module, and run-profile merge rulvar run would assemble, but constructs no engine, opens no store, and dispatches nothing: the report is computed by preflightEstimate over options alone, so the command cannot pay for a single provider token by construction. The declared spawn wave comes from the preflight export of the config or workflow module (module wins), and --spawns JSON overrides it from the command line. --json prints the machine-readable report. Exit 1 when any finding has severity 'error' (the linter contract: green preflight means the run can at least start), 0 otherwise.

Parameters

ParameterType
argvstring[]
contextCommandContext

Returns

Promise&lt;number&gt;