Command line
The courier command runs your .http files from a terminal or a CI job. It uses the same engine, environments, references and scripts as the app, so a request that passes in Courier passes on the command line too.
To install it, see Install the command-line tool.
Commands
Section titled “Commands”| Command | What it does |
|---|---|
courier run |
Send requests and run their tests |
courier list |
List requests in sidebar order, with their @names |
courier envs |
List environments and how many variables each has |
courier export |
Export a folder as a Postman collection, OpenAPI or HTML docs |
courier sync |
Compare an OpenAPI spec with a folder’s requests |
courier mock |
Serve an OpenAPI file’s examples on 127.0.0.1 |
Run courier <command> --help for every option.
Quick examples
Section titled “Quick examples”courier run # every request in the workspace, in sidebar ordercourier run "02 Auth" --env dev # one folder, with an environmentcourier run 'api/**/*.http' --var token=abc # a glob, with a variable overridecourier run checks --bail --parallel 4 # stop at the first failure, 4 at a timecourier list # requests and their namescourier envs # environmentsFinding the workspace
Section titled “Finding the workspace”The workspace is the nearest folder, from the paths you give or the current folder, that has an http-client.env.json. Use --root <dir> to set it yourself.
Global options
Section titled “Global options”| Option | What it does |
|---|---|
--root <dir> |
The workspace folder |
--no-color |
Never use colours. Also off when output isn’t a terminal or NO_COLOR is set |
-V, --version |
Print the version |