rulvar API reference / @rulvar/cli
@rulvar/cli
Interfaces
| Interface | Description |
|---|---|
| AssembledCli | - |
| CliConfig | The shape both the config module and a workflow module may export. |
| CliIo | - |
| CommandContext | - |
| CreateServerOptions | - |
| CreateWorkerOptions | - |
| RulvarServer | - |
| SpanLike | The tiny subset of the OTel Tracer/Span API the exporter uses. |
| ToOtelOptions | - |
| TracerLike | - |
| Worker | - |
Variables
| Variable | Description |
|---|---|
| DEFAULT_STORE_DIR | - |
| DEFAULT_WORKER_TTL_MS | Appendix A: the committed reference lease ttl. |
| HELP | @rulvar/cli: the rulvar shell (https://docs.rulvar.com/guide/cli). M5 surface: run/resume/runs ls/inspect over the canonical grammar, TUI progress on the event stream, interactive resolution of suspended approvals and externals. plan/kb commands land M6+/M10; createServer/createWorker land M8; the OTel exporter lands M5-T08. |
Functions
| Function | Description |
|---|---|
| assembleEngine | - |
| attachProgress | Attaches the renderer to a handle's event stream; returns a detach. |
| createServer | - |
| createWorker | - |
| driveRun | Drives a handle to a terminal outcome, resolving suspensions interactively and resuming until the run settles or input runs dry. |
| inspectCommand | - |
| loadCliConfig | Loads rulvar.config.mjs/.js from cwd; absent config is fine. |
| loadWorkflowModule | Imports a workflow module given on the command line. |
| looksLikeFile | True when the run target names a file rather than a registry entry. |
| processIo | The process-backed io the bin entry uses. |
| renderEventLine | Renders one event to a line, or undefined for silent event types. |
| reportOutcome | Renders the settled outcome; returns the process exit code. |
| resumeCommand | - |
| runCli | @rulvar/cli: the rulvar shell (https://docs.rulvar.com/guide/cli). M5 surface: run/resume/runs ls/inspect over the canonical grammar, TUI progress on the event stream, interactive resolution of suspended approvals and externals. plan/kb commands land M6+/M10; createServer/createWorker land M8; the OTel exporter lands M5-T08. |
| runCommand | - |
| runsLsCommand | - |
| toOtel | Exports one settled run's event stream onto a tracer. The run's events are consumed in seq order; span openers start spans, the matching closers end them, and payload-only events attach as span events on the innermost open span. Returns the number of spans created. |