rt command line
rt runs the same core as the apps: what is green in the app is green in the pipeline. The output is made for programs – JSON on stdout, exit codes a pipeline understands – and you pass secrets as pipeline variables, never in the files.
- Edition
- Free
- Systems
- macOS, Linux x86_64 and aarch64
- Also
- Docker image, GitHub Action
- Output
- JSON report, JUnit, text
- Exit codes
- 0 to 4
The commands
| Command | What for |
|---|---|
rt send | Send one request; JSON report on stdout |
rt run | Send a collection or folder in order, with tests and assertions |
rt import | Turn other tools’ exports into a collection folder |
rt scan | Check collection files for credentials |
rt mock | Answer with the saved examples, as a mock server |
rt docs | Write a static HTML page from the collection |
rt mcp, rt approvals, rt approve, rt deny | MCP server for AI agents and its approvals (AI agents and MCP server) |
rt mcp-test | Run saved MCP tests (MCP client) |
rt agent | Companion for the web app (Companion rt agent) |
rt --help and rt <command> --help show every option. The downloads for macOS and Linux are on the download page.
rt send
rt send <request-file> [--env NAME] [--var NAME=VALUE]... [--pretty]
The collection is the nearest folder above the request file that contains opencollection.yml.
| Option | Meaning |
|---|---|
-e, --env NAME | Use the environment NAME |
--var NAME=VALUE | Runtime variable with the highest precedence, repeatable – for secrets from the pipeline or another host |
--body-limit BYTES | Keep at most this many body bytes in the report (default 10 MiB) |
--plugin FILE.wasm, --no-plugins | Also run a plugin, or do not run the installed ones |
--cookie-jar FILE | Send cookies from the file and store new ones in it |
--no-prompt | Fail instead of waiting for an OAuth sign-in (pipelines) |
--no-scripts | Do not run the collection’s scripts; assertions still run |
--pretty | Indent the JSON |
The output is one JSON object, the send report: what went on the wire (secrets as ***), the response with status, headers, body and timing, the variables used and their origin, placeholders without a value, results of tests and assertions and any error. The web app produces the same report. WebSocket, gRPC and SSE (--sse) open sessions; see gRPC, WebSocket, SSE and GraphQL.
rt send health/status.yml --env CI --var token="$API_TOKEN" \
| jq -e '.response.status == 200'
rt run
rt run sends every request of a collection or folder in order and reports tests and assertions – the command for pipelines. Variables that scripts set carry over to the following requests of the run, never into the files.
rt run # the collection (or folder) you are in
rt run api/users -e Staging --var token=$API_TOKEN
rt run . --data users.csv --reporter junit=reports/junit.xml --reporter json=reports/run.json
| Option | Meaning |
|---|---|
--data FILE | CSV or JSON; each row is an iteration with its own variables |
--iterations N | Send the requests N times |
--delay MS | Wait between requests |
--bail | Stop at the first failure |
--reporter NAME[=FILE] | text, json or junit, repeatable |
junit writes JUnit XML as GitHub, GitLab and Jenkins read it: a test suite per request, a test case per test and assertion. json holds the complete, masked rt send report for each step. text is always on, one line per request on stderr.
Exit codes
| Code | rt send | rt run |
|---|---|---|
| 0 | A response arrived, whatever its HTTP status | Every request answered, every test and assertion passed |
| 1 | No response: connection, DNS, TLS, timeout, too many redirects | No network stack |
| 2 | Usage error, no collection, invalid files, request not in the collection | Usage error, unknown environment, unreadable data file |
| 3 | Request could not be prepared: unknown environment, invalid URL, auth failed, a plugin or script stopped it | External secrets or plugins could not be set up |
| 4 | A response arrived but a test or assertion failed | A request, test or assertion failed |
In a pipeline
Pass secrets as job variables to --var; never write them into the collection. With --no-prompt, an OAuth flow that needs a person fails instead of waiting.
GitHub Actions, with the action from the core repository:
- uses: clouddnagmbh/requesttailor/github-action@v1
with:
collection: api
environment: Staging
junit: reports/junit.xml
env:
RT_VAR_token: ${{ secrets.API_TOKEN }}
GitLab CI or any other environment with Docker, with the image ghcr.io/clouddnagmbh/rt (minimal, no shell, running as a non-root user):
docker run --rm -v "$PWD:/work" ghcr.io/clouddnagmbh/rt run . --reporter junit=junit.xml
rt import
rt import shop.postman_collection.json prod.postman_environment.json --out ./shop
rt import api.yaml --format openapi --out ./api --json
Prints the loss report. Exit code 0 once the collection is written, 2 if the input cannot be read or --out is not empty. Details in import on the command line.
rt scan
Finds credentials in collection files before they reach Git – the same scanner the app runs before every commit. Exit code 0 without findings, 1 with findings, 2 if a path cannot be read. A finding’s value is never printed. As a Git pre-commit hook (.git/hooks/pre-commit, executable):
#!/bin/sh
files=$(git diff --cached --name-only --diff-filter=ACMR -- '*.yml' '*.yaml' '*.json')
[ -z "$files" ] && exit 0
exec rt scan $files
rt mock and rt docs
Requests can keep saved examples: a request and the response it got (also carried over by the Postman import). rt mock answers with them, so the app, a front end or a test can work before the real service exists:
rt mock . --env Local --port 4010
An incoming request matches an example by method and path; when several fit, the one whose saved request matches best wins. Without a match there is a 404 with a list of all routes. The mock listens on 127.0.0.1 unless you pass --host.
rt docs . --out site writes a static HTML page with a stylesheet: folders, requests with method, URL, description, parameters, headers, body, auth type and examples. Secret values never appear; anything that looks like a credential is shown as ***.
See also
- Features at a glance Features · tests
- Docs Scripts, tests and runner
- Docs Import
- Docs AI agents and MCP server
- Docs Companion rt agent
- Sources Runner1 · rt mock and rt docs2 · Platforms3