LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

bru

Run API requests from Bruno collections

TLDR

Run a single API request
$ bru run [request.bru]
copy
Run all requests in a folder
$ bru run [folder/]
copy
Run with a specific environment
$ bru run [folder/] --env [production]
copy
Run with environment variables
$ bru run [request.bru] --env-var [API_KEY=secret]
copy
Generate JSON, JUnit, and HTML reports
$ bru run [folder/] --reporter-json [results.json] --reporter-junit [results.xml] --reporter-html [results.html]
copy
Import an OpenAPI spec as a Bruno collection
$ bru import openapi --source [api.yml] --output [~/collections] --collection-name [MyAPI]
copy
Run and stop on first failure
$ bru run [folder/] --env [staging] --bail
copy
Run with custom CA certificate
$ bru run [request.bru] --cacert [/path/to/ca.crt]
copy

SYNOPSIS

bru run [paths...] [options]bru import format [options]

DESCRIPTION

bru is the command-line interface for Bruno, an open-source API client similar to Postman or Insomnia. Bruno stores API collections directly in the filesystem using plain text .bru files, making them version-control friendly.The CLI enables headless execution of API requests for CI/CD pipelines, automated testing, and scripted operations. Collections can be stored alongside code repositories for easy collaboration.

PARAMETERS

--env name

Use a specific environment for the run.
--env-var key=value
Set environment variables for the run.
--reporter-json file
Output results in JSON format.
--reporter-junit file
Output results in JUnit XML format.
--reporter-html file
Output results in HTML format.
--cacert path
Path to a CA certificate file for HTTPS requests.
--insecure
Skip SSL certificate verification.
-r, --recursive
Recursively run requests in subfolders.
--bail
Stop execution after a failed request, test, or assertion.
--sandbox mode
JavaScript execution mode: safe (default) or developer.
--parallel
Run requests in parallel instead of sequentially.
--delay ms
Delay between requests in milliseconds.
--tests-only
Execute only requests containing tests or active assertions.
--csv-file-path file
Run collection once for each row in a CSV file.
--env-file file
Path to an environment file (.bru or .json).

CAVEATS

Requires Node.js runtime. Install with npm install -g @usebruno/cli. Starting from v3.0.0, the default runtime is Safe Mode; use --sandbox=developer to enable external npm packages and filesystem access. The CLI works with Bruno collection folders containing .bru files and optional environment configurations.

HISTORY

Bruno was created as a lightweight, open-source alternative to proprietary API clients. The project emphasizes storing collections as code in plain text format for better Git integration and developer workflows.

SEE ALSO

curl(1), httpie(1), newman(1)

Copied to clipboard
Kai