Rentgen CLI

API reality checks from your terminal.

Export a .rentgen project once, then run Rentgen from the terminal, Docker or CI/CD pipelines. No cloud runner. No hosted sync. No extra scripting layer. Just the same local-first checks that expose fragile API behavior before automation becomes expensive.

Local-first Docker-ready CI/CD friendly JSON reports

Why the CLI exists

Most API automation starts after somebody manually confirms that one request works. Rentgen CLI exists for the step before that confidence becomes dangerous. It runs a folder of requests from a .rentgen project export straight from the terminal, so teams can bring API reality checks into scripted workflows without opening the desktop app every time.

The CLI ships inside the desktop app. Install Rentgen once, click a button in Settings, and the rentgen command is on your PATH. Same binary, same version, every release.

Before automationUse it after a request works, before you build long-term automation around assumptions.
Read-only project fileThe CLI reads the exported project and never writes back to it.
CI-friendly outputUse exit codes and JSON reports to make pipelines understand Rentgen results.

Install

1. Install the Rentgen desktop app

Download the latest installer for your platform from Rentgen Releases.

PlatformFile
macOS Apple SiliconRentgen-<version>-mac-arm64.dmg
macOS IntelRentgen-<version>-mac-x64.dmg
Windows x64Rentgen-<version>-win-x64.exe
Windows ARM64Rentgen-<version>-win-arm64.exe
Debian / UbuntuRentgen-<version>-linux-x64.deb or linux-arm64.deb
Fedora / RHELRentgen-<version>-linux-x64.rpm or linux-arm64.rpm

Install it the normal way: open the DMG on macOS, run the EXE on Windows, or install the DEB/RPM package on Linux.

Linux install examples
sudo apt install ./Rentgen-<version>-linux-x64.deb
sudo dnf install ./Rentgen-<version>-linux-x64.rpm

2. Enable the rentgen command

Linux packages create /usr/bin/rentgen automatically. On macOS and Windows, open Rentgen, go to Settings → CLI, and click Install rentgen command in PATH.

Check installation
rentgen --version
After installing the command on macOS or Windows, open a new terminal tab. Existing shells usually do not see PATH changes until they are restarted.

First run

Export a project from the desktop app using General → Export Project, then point the CLI at that file.

Interactive run
rentgen xray ./rentgen-project.rentgen

The CLI will let you pick a folder and environment interactively. Pick one, hit enter, and watch the requests fly.

For CI or scripted runs, pass everything explicitly.

Scripted run
rentgen xray ./rentgen-project.rentgen \
  --collection="Smoke Tests" \
  --env=staging \
  --fail-fast \
  --skip-integrity-check

Use rentgen xray --help for the full flag list. rentgen run is accepted as an alias for rentgen xray, but xray is the command that best describes what Rentgen does.

Run from Docker

For CI/CD pipelines you do not have to install the desktop app. The CLI ships as a public Docker image.

Pull image
docker pull ghcr.io/rentgen-io/rentgen-cli:latest
TagMeaning
:1.20.0Exact version. Recommended for CI because it is fully reproducible.
:1.20Latest patch in the 1.20 minor line. Picks up bug fixes automatically.
:latestNewest published release. Convenient, but a major release may change behavior without warning.

Both linux/amd64 and linux/arm64 images are published, and Docker pulls the right one automatically.

Local one-off run
docker run --rm -v "$PWD":/work -w /work \
  ghcr.io/rentgen-io/rentgen-cli:1.20.0 \
  xray ./project.rentgen \
  --collection="Smoke Tests" \
  --env=staging \
  --skip-integrity-check
--skip-integrity-check is required when running headless. There is no TTY for the checksum confirmation prompt, and without this flag the CLI exits with code 2.

CI/CD examples

The .rentgen file can live in your repository next to your application code or API test assets. The pipeline checks out the repo and runs Rentgen against that exported project.

GitHub Actions

.github/workflows/rentgen.yml
jobs:
  rentgen-api-check:
    runs-on: ubuntu-latest
    container:
      image: ghcr.io/rentgen-io/rentgen-cli:1.20.0
    steps:
      - uses: actions/checkout@v5
      - run: rentgen xray ./project.rentgen --collection="Smoke Tests" --env=staging --skip-integrity-check

GitLab CI

.gitlab-ci.yml
rentgen-api-check:
  image: ghcr.io/rentgen-io/rentgen-cli:1.20.0
  stage: test
  script:
    - rentgen xray ./project.rentgen --collection="Smoke Tests" --env=staging --skip-integrity-check

Bitbucket Pipelines

bitbucket-pipelines.yml
pipelines:
  default:
    - step:
        name: Rentgen API check
        image: ghcr.io/rentgen-io/rentgen-cli:1.20.0
        script:
          - rentgen xray ./project.rentgen --collection="Smoke Tests" --env=staging --skip-integrity-check

Jenkins

Declarative pipeline
pipeline {
  agent {
    docker {
      image 'ghcr.io/rentgen-io/rentgen-cli:1.20.0'
      args '-v $WORKSPACE:/work -w /work'
    }
  }
  stages {
    stage('Rentgen API check') {
      steps {
        sh 'rentgen xray ./project.rentgen --collection="Smoke Tests" --env=staging --skip-integrity-check'
      }
    }
  }
}

Docker notes

  • The image is public, so no docker login is required.
  • The container runs as root by default. To run as a non-root user, build your own image from ghcr.io/rentgen-io/rentgen-cli:1.20.0 and add USER 1001.
  • Exit codes are the same as the native CLI: 0 all pass, 1 failures or interrupted, 2 invalid input or missing CI flags.

Update and uninstall

Update

Updating the CLI is the same as updating the desktop app. Download the latest DMG, EXE, DEB or RPM and install over the top. The bundled CLI is replaced too. The PATH symlink keeps pointing at the new binary, so no second click is needed unless you uninstalled it.

On Linux, apt upgrade rentgen or dnf upgrade rentgen reinstalls the symlink automatically.

Uninstall only the CLI

Open Settings → CLI and click Uninstall CLI. This removes the symlink on macOS and Linux, or the PATH entry on Windows. The desktop app stays installed.

Uninstall everything

  • macOS: drag Rentgen.app to Trash and remove the symlink with sudo rm /usr/local/bin/rentgen if needed.
  • Windows: uninstall Rentgen from Add or Remove Programs. Optionally remove the resources directory from your user PATH.
  • Debian / Ubuntu: run sudo apt remove rentgen.
  • Fedora / RHEL: run sudo dnf remove rentgen.

Troubleshooting

command not found: rentgen

Open a new terminal after clicking Install. On macOS, confirm that /usr/local/bin is on your PATH. On Linux, confirm that /usr/bin/rentgen exists. On Windows, open a fresh PowerShell and check the user PATH.

Useful checks
echo $PATH | tr ':' '\n' | grep local
ls -l /usr/bin/rentgen
[Environment]::GetEnvironmentVariable('Path', 'User')

rentgen runs, but it is a different program

Another tool may already provide a rentgen binary on your PATH. The Settings panel shows a warning when this happens. Uninstall the conflicting tool, reorder PATH so Rentgen comes first, or rename the symlink manually.

macOS unidentified developer warning

This should not happen on official releases because the binary is signed and notarized as part of the app bundle. If you installed from an unsigned local build, remove quarantine manually.

Local macOS builds
xattr -d com.apple.quarantine /usr/local/bin/rentgen

Windows SmartScreen warning

On first run from a fresh install, Windows may show SmartScreen. Click More info → Run anyway. After Rentgen has been launched once, the warning should not appear again.

Linux glibc / libstdc++ errors

The bundled binary uses the same Node 18 runtime that pkg ships. If your distro is older than glibc 2.28, upgrade the distro or build the CLI from source.

Build from source
git clone ...
npm ci
npm run build:cli
node ./dist/cli/index.js run ...

Bundled CLI binary not found in this build

You are running an unpackaged dev build, or the binary failed to bundle. Run npm run package to produce a real installer, or install the latest official release.

Reference

FlagDescription
--collection <name>Folder to run from the project file. Omit to pick interactively.
--env <name>Environment to use. Pass --env=none to run without any environment.
--skip-integrity-checkSkip the checksum confirmation prompt.
--var <key=value>Override a variable. Repeatable. Highest priority over env and dynamic values.
--timeout <ms>Per-request timeout in milliseconds. Default 30000.
--fail-fastStop after the first failed check or unexpected response.
--report <format>Machine-readable output. Supported: json, which writes JSON to stdout and suppresses human output.
--no-colorDisable colored output.
--verbosePrint full request/response details and warn about unresolved variables.
Exit codeMeaning
0All requests passed.
1Run completed with failures, aborted at the checksum prompt, or interrupted with Ctrl+C.
2Invalid input: missing file, bad JSON, wrong shape, ambiguous or unknown --collection / --env, or CI mode without required flags.

The CLI never writes to the project file. Dynamic variables extracted from responses are kept in memory for the duration of a single run, so two back-to-back invocations against an unmodified project produce byte-identical resolved URLs, headers, and bodies.