Run .http files in CI
The .http files you send from VS Code can also run as API tests in your pipeline. plainwire is a free command-line runner for the REST Client / JetBrains HTTP format. It sends every request in order, checks the # @assert lines, prints a pass/fail report and exits with code 1 when anything fails. It is one JavaScript file that needs only Node.js 18 or newer, with no account, no login and no run limits.
The CLI first shipped with Plainwire 0.3.0. It shares its request engine with the Plainwire VS Code extension, so a file that passes in the editor passes in CI. You can use the CLI without the extension.
Try it in ten seconds
curl -fsSLO https://github.com/janwan2003/vscode-api-client/releases/latest/download/plainwire.mjs
node plainwire.mjs run # every .http / .rest file under the current folder
node plainwire.mjs run api/ --env staging --junit results.xml
To get a plainwire command on your PATH, install the release tarball with npm (no registry account involved):
npm install -g https://github.com/janwan2003/vscode-api-client/releases/download/v0.17.0/plainwire-cli-0.17.0.tgz
The output looks like this:
plainwire 0.8.0 · 3 requests in 1 file · environment staging from http-client.env.json
api/users.http
✓ POST Log in 200 · 84 ms · 2/2 checks
✓ GET Current user 200 · 31 ms · 3/3 checks
✗ DELETE Remove a user 403 · 29 ms · 0/1 checks
status == 204: expected 204, got 403
at api/users.http:21
2 passed, 1 failed (3 requests, 151 ms)
A test file
A test is an ordinary request with # @assert comment lines above it. Other clients ignore those lines, so the file still works in REST Client and in JetBrains IDEs. The full assertion grammar (status, time, size, headers, body and JSONPath subjects, with 23 operators) is on the API tests guide.
# api/users.http ### Log in # @name login # @assert status == 200 # @assert $.token isString POST {{baseUrl}}/auth/login Content-Type: application/json { "email": "ci@example.com", "password": "{{$processEnv API_PASSWORD}}" } ### Current user # @assert status == 200 # @assert $.roles contains "admin" # @assert time < 500 GET {{baseUrl}}/me Authorization: Bearer {{login.response.body.$.token}} ### Remove a user # @assert status == 204 DELETE {{baseUrl}}/users/42 Authorization: Bearer {{login.response.body.$.token}}
The rules are simple. A request passes when all its checks pass. A request without checks passes when its status is below 400, so a plain collection works as a smoke test straight away. # @skip leaves a request out. When a request uses {{login.response...}}, the login request is sent first if it has not run yet.
GitHub Actions
The repository is also a GitHub Action. It downloads the CLI from the matching release and runs it:
# .github/workflows/api-tests.yml name: API tests on: [push, pull_request] jobs: api: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # start your API here, e.g. docker compose up -d - uses: janwan2003/vscode-api-client@v0.17.0 with: files: api/ env: ci junit: api-results.xml args: --var token=${{ secrets.API_TOKEN }} env: API_PASSWORD: ${{ secrets.API_PASSWORD }}
Inside GitHub Actions the runner also:
- writes a pass/fail table to the job summary, and
- prints
::errorannotations, so every failed request is flagged on its line in the pull request diff.
| Input | Meaning |
|---|---|
files | Files, folders or quoted globs, space-separated. Default: every .http / .rest file. |
env | Environment name from http-client.env.json. |
junit | Path for a JUnit XML report (for test-report actions). |
args | Any other options, e.g. --bail --insecure. |
working-directory | Where to run. Default: the repository root. |
version | CLI release to use. Default: the tag in uses:. |
GitLab CI, Jenkins and others
Any runner with Node.js works the same way. GitLab picks up the JUnit file as a test report:
# .gitlab-ci.yml
api-tests:
image: node:22-alpine
script:
- wget -q https://github.com/janwan2003/vscode-api-client/releases/download/v0.17.0/plainwire.mjs
- node plainwire.mjs run api/ --env ci --junit api-results.xml
artifacts:
when: always
reports:
junit: api-results.xml
In Jenkins, Azure Pipelines or CircleCI, run the same two commands and point their JUnit publisher at the XML file. Exit codes are 0 when everything passed, 1 when a request failed or could not be sent, and 2 for a usage error such as an unknown environment.
Environments and secrets
The CLI reads environments from the same places as the extension, later sources winning:
rest-client.environmentVariablesandplainwire.environmentVariablesin.vscode/settings.json,- every
http-client.env.jsonunder the working directory, - every
http-client.private.env.json(keep it out of git), - files given with
--env-file, then single values from--var name=value.
Keep secrets in your CI's secret store and pass them in as environment variables. Read them in the file with {{$processEnv NAME}}, or from a .env file with {{$dotenv NAME}}. The $shared environment is merged into the selected one, as in REST Client.
Options
| Option | What it does |
|---|---|
-e, --env <name> | Select an environment. |
--env-file <file> | Extra environment file in http-client.env.json format (repeatable). |
--var name=value | Set a variable; wins over the environment (repeatable). |
-g, --grep <regex> | Only requests whose title, @name or URL matches. |
--bail | Stop after the first failed request. |
--timeout <ms> | Per-request timeout (default 60000). |
-k, --insecure | Accept self-signed or invalid TLS certificates (or put # @insecure above one request). |
--proxy <url> | HTTP proxy. Default: HTTPS_PROXY / HTTP_PROXY; NO_PROXY is honoured. |
--no-redirect | Do not follow redirects (or # @no-redirect per request). |
--no-scripts | Do not run JavaScript < {% %} / > {% %} scripts (scripts guide). Use it for files you have not reviewed, such as pull requests from forks. |
--junit, --json, --markdown <file> | Write a report. |
-v, --verbose | Print the response body of failed requests and every script’s log (failed requests always print their script log). |
-q, --quiet | Print only failures and the summary. |
Converting Postman and Thunder Client collections
If your requests still live in Postman or Thunder Client, convert them first. Thunder Client data does not need an export: import --thunder reads it from Thunder Client’s storage folder on this computer (where that is). Common test snippets become # @assert lines; other Postman scripts are kept as > {% %} / < {% %} blocks and run with a pm API:
node plainwire.mjs import postman_collection.json --out api/
node plainwire.mjs import thunder-tests/ --out api/
node plainwire.mjs import --thunder --out api/ # Thunder Client's own data, no export or login
node plainwire.mjs run api/
The field mappings are described in the Postman guide and the Thunder Client guide.
How it compares
| plainwire | httpYac CLI | Thunder Client CLI | Postman (Newman) | |
|---|---|---|---|---|
| Runs | .http files | .http files | Collections stored by the Thunder Client extension | Postman collection JSON |
| Price | Free | Free | Listed on the Free plan | Free |
| Checks | # @assert lines and JS client.test | ?? lines and JS | Tests set up in the extension | JS pm.test |
| Install | One file, Node 18+ | npm package | npm package, Node 22+, plus the extension | npm package |
| JavaScript scripting | Yes, JetBrains < {% %} / > {% %} and Postman pm scripts (--no-scripts to skip) | Yes | Paid plans | Yes |
Based on each project’s public documentation and pricing pages, read November 2026. If your scripts send their own requests (pm.sendRequest) or need npm packages, httpYac or Newman will suit you better. If you want plain files, readable checks and a single download, try plainwire; see scripts in .http files for what runs.
Questions
Is it free? Are there run limits?
Free and MIT-licensed, with no account and no limit on requests or runs. The CLI makes no network calls except the requests in your files, plus the one download of the CLI itself in the GitHub Action.
Do I need VS Code?
No. The CLI only needs Node.js 18 or newer. The VS Code extension is the comfortable way to write and debug the files.
Will my REST Client files work?
Yes. The CLI reads the REST Client format: ### separators, @var = value, {{var}}, system variables, # @name chaining, < ./file bodies and rest-client.environmentVariables. REST Client has no assertions, so add # @assert lines where you want checks. Without them, a request passes on any status below 400.
How do I test against a local server with a self-signed certificate?
Pass --insecure, or put # @insecure above the requests that need it. See certificates, ports and proxies.
The rest of the format is on the .http syntax cheat sheet.