resterm-runner

April 25, 2026 ยท View on GitHub

A headless CLI runner for resterm.

Requests created in resterm can be executed directly by resterm-runner against any configured environment. This enables automated validation of API contracts, regression testing across deployments, and environment-level response comparison as part of a standard build or release process.

Install

Download a prebuilt binary from the releases page, or build from source:

go install github.com/unkn0wn-root/resterm-runner@latest

Usage

Run a single named request:

resterm-runner --file api.http --request login

Run all requests in a file against a specific environment:

resterm-runner --file api.http --env production --all

Run requests matching a tag:

resterm-runner --file api.http --tag smoke --env staging

Compare the same request across two environments and generate a JUnit report:

resterm-runner --file api.http \
  --compare "dev,staging" \
  --compare-base staging \
  --report-junit results.xml

Use a positional argument instead of --file:

resterm-runner api.http --all

Flags

FlagDefaultDescription
--filePath to .http/.rest file
--envEnvironment name
--env-filePath to environment file
--requestRun a specific named request
--workflowRun a named workflow
--tagRun requests matching a tag
--allfalseRun all requests in the file
--compareCompare environments (comma or space separated)
--compare-baseBaseline environment for comparison
--exit-code-modedetailedExit code mode: detailed or summary
--timeout30sRequest timeout
--run-timeout0Whole-run timeout; 0 disables it
--insecurefalseSkip TLS certificate verification
--followtrueFollow redirects
--proxyHTTP proxy URL
--recursivefalseRecursively scan workspace for request files
--workspaceWorkspace directory to scan
--report-jsonWrite a JSON report to the given path
--report-junitWrite a JUnit XML report to the given path
--artifact-dirWrite run artifacts to the given directory
--state-dirDirectory for persisted runner state
--persist-globalsfalsePersist runtime globals and file variables between runs
--persist-authfalsePersist authentication caches between runs
--historyfalsePersist request history
--profilefalseProfile request execution
--versionPrint version and exit

Exit codes

Detailed mode is the default. Summary mode preserves the legacy report behavior: 0 when all requests pass, 1 when any request fails, and 2 for usage or configuration errors.

CodeMeaning
0All requests passed
1Assertion, trace budget, or generic request failure
2Usage or configuration error
3Internal or unknown failure
20Timeout
21Network failure
22TLS failure
23Authentication failure
24Script failure
25Filesystem failure
26Protocol failure
27Route failure
130Run canceled

License

See LICENSE for details.