Skip to content

CLI overview

reqloom has three subcommands and no global configuration file. Everything is a flag or a project directory.

CommandDoesTypical use
reqloom runResolves and executes a chain ending at one operationLocal development, CI
reqloom lintValidates a schema and dry-runs every operationPre-commit hooks, CI gate
reqloom importConverts an existing API definition into a projectOne-time migration
Terminal window
reqloom --help

There is no shared flag set beyond --project. Each command parses its own arguments, and passing a flag to the wrong command either errors or is ignored:

Flagrunlintimport
--project <path>yesyes—
--env <name>yes——
--var KEY=VALUEyes——
--format <fmt>yes——
--output <file>yes——
--quietyes——
--out <dir>——yes
--project-root <dir>——yes
--force——yes
--help / -hyes—yes

Two things to know about that table:

  • lint ignores unknown arguments silently. reqloom lint --format json does not error — it runs a normal lint and discards the flag. There is no lint --help either; use reqloom --help.
  • run and import require the positional argument first. reqloom run --env staging order.create fails, because the first argument is always read as the operation id. Write reqloom run order.create --env staging.

Every command works against a project directory — a folder containing a reqloom.yaml. run and lint default to the current directory:

Terminal window
cd my-api && reqloom lint # uses ./reqloom.yaml
reqloom lint --project ../my-api # or point at it explicitly

If there’s no reqloom.yaml there, you get an error and exit code 1:

Terminal window
Error: reqloom.yaml not found in /Users/you/somewhere

The same four codes across all three commands. They’re designed so CI can tell a genuine test failure apart from a broken invocation.

CodeMeaning
0Success. The chain passed, the schema is clean, or the import was written
1Ran correctly, result was bad — failing step, schema error, or write failure
2You invoked it wrong — unknown flag, missing operation, bad --format
3Reqloom crashed. Please report it

In a CI pipeline, treat 1 as “the API is broken” and 2 or 3 as “the pipeline is broken”:

Terminal window
reqloom run checkout.complete --format junit --output results.xml
case $? in
0) echo "pass" ;;
1) echo "API failure — see results.xml" ;;
*) echo "reqloom invocation or crash — check the command" ; exit 1 ;;
esac

The exit code does not encode which error occurred. Every schema, network, and assertion failure is exit 1; the specific E_* code appears in the output. See error codes for the full list.

Deliberately split so you can pipe one without the other:

  • stdout — the rendered result: the summary table, or the JSON/JUnit document, or import’s success line.
  • stderr — failures and diagnostics: failed steps, schema errors, and import’s review notes.

Failed steps print to stderr even under --quiet, so a CI log always shows what broke:

Terminal window
reqloom run order.pay --quiet > /dev/null # stderr still reports failures