Skip to content

ltl-cli

The command-line usage is the CLI. This page is the module, for anything that wants to run a check inside its own process.

run(argv) Parses argv and dispatches. Returns { stdout, stderr, code }.
check(argv) The check subcommand.
analyze(argv) The analyze subcommand. Reaches @rhysbalevicius/ltl-analyze by dynamic import.
parseCheckArgs(argv), parseAnalyzeArgs(argv) Argument parsing on its own, for a caller building its own front end.
USAGE The help text.
Type
CliResult { stdout, stderr, code }, where code is 0 | 1 | 2.
CheckOptions, CheckResult What check takes and returns.
AnalyzeOptions What analyze takes.
loadSpec(path) A rule set from a .ts/.js module or a .json document.
loadTraces(paths) Trace files, or directories searched for .jsonl. Skips verdict streams a previous run wrote.
ConfigError What both throw, and the reason for exit code 2.
LoadedTrace One trace and where it came from.

The shapes described in artifacts.

buildArtifacts(spec, traces) The summary and every verdict stream.
toJsonl(records) The line-delimited form.
outcomeOf(events) A trace’s outcome, read from its closing event.
runIdOf(events) Its run id.
Type
Artifacts Everything a check produces.
Summary summary.json.
RuleManifestEntry, TraceManifestEntry Its two manifests.
Matrix cells[ruleIndex][traceIndex], with both axes.
StatusCounts The counts, over matrix cells rather than over transitions.