CLI Options Reference
Complete reference for all Bruno CLI commands, options, and flags.Global Options
These options are available for all commands:Show help information.Aliases:
-hShow version number.
Run Command
Execute API requests and tests from your collection.Paths
One or more request files or folders to run. If omitted, runs all requests in the current directory recursively.
Execution Options
Run requests recursively in subdirectories.
Only run requests that have tests or active assertions.
Stop execution immediately after a failure of a request, test, or assertion.
Add delay between each request in milliseconds.
Enable verbose output for debugging purposes.
Environment Options
Specify environment to run with. Loads from
environments/<name>.bru or environments/<name>.yml.Path to environment file (.bru, .json, or .yml) - absolute or relative.
Override a single environment variable. Can be used multiple times.
Global environment name (requires collection to be in a workspace).
Path to workspace directory (auto-detected if not provided).
Output and Reporting
Path to write file results to. Use with
--format to specify format.Aliases: -oFormat of the file results.Aliases:
-fOptions: json, junit, htmlPath to generate a JSON report.
Path to generate a JUnit XML report.
Path to generate an HTML report.
Reporter Customization
Omit all headers from the reporter output.
Skip specific headers from the reporter output.
Omit request body from the reporter output.
Omit response body from the reporter output.
Omit both request and response bodies from the reporter output.
Security and Certificates
CA certificate to verify peer against. By default, uses system truststore + custom cert.
Use only the specified custom CA certificate (—cacert) and ignore the default truststore.
Allow insecure server connections (skip SSL certificate verification).
Path to client certificate configuration JSON file.Config format:
Network Options
Disable all proxy settings (both collection-defined and system proxies).
Disable automatic cookie saving and sending with requests.
Advanced Options
JavaScript sandbox runtime to use.Options:
safe- Uses QuickJS (secure, limited features)developer- Uses Node.js VM (more features, less secure)
Comma-separated list of tags to include in the run.
Comma-separated list of tags to exclude from the run.
Import Command
Import collections from other formats.Import Types
Type of collection to import.Options:
openapi, wsdlImport Options
Path to the source file or URL.Aliases:
-sPath to the output directory. Conflicts with
--output-file.Aliases: -oPath to the output JSON file. Conflicts with
--output.Aliases: -fName for the imported collection.Aliases:
-nFormat of the imported collection.Options:
bru, opencollectionSkip SSL certificate verification when fetching from URLs.
How to group imported requests (OpenAPI only).Aliases:
-gOptions: tags, pathExit Codes
Bruno CLI returns specific exit codes for scripting and automation:| Exit Code | Constant | Description |
|---|---|---|
0 | - | Execution successful |
1 | ERROR_FAILED_COLLECTION | An assertion, test, or request failed |
2 | ERROR_MISSING_OUTPUT_DIR | The specified output directory does not exist |
3 | ERROR_INFINITE_LOOP | The request chain loops endlessly |
4 | ERROR_NOT_IN_COLLECTION | Bru was called outside of a collection root |
5 | ERROR_FILE_NOT_FOUND | The specified input file does not exist |
6 | ERROR_ENV_NOT_FOUND | The specified environment does not exist |
7 | ERROR_MALFORMED_ENV_OVERRIDE | Environment override not presented as string or object |
8 | ERROR_INCORRECT_ENV_OVERRIDE | Environment override format incorrect |
9 | ERROR_INCORRECT_OUTPUT_FORMAT | Invalid output format requested |
10 | ERROR_INVALID_FILE | Invalid file format |
11 | ERROR_WORKSPACE_NOT_FOUND | The specified workspace was not found |
12 | ERROR_GLOBAL_ENV_REQUIRES_WORKSPACE | Global environment requires a workspace |
13 | ERROR_GLOBAL_ENV_NOT_FOUND | The specified global environment was not found |
255 | ERROR_GENERIC | Another error occurred |
Using Exit Codes in Scripts
Environment Variables
Bruno CLI respects the following environment variables:HTTP proxy server URL.
HTTPS proxy server URL.
Comma-separated list of hosts to exclude from proxying.
Complete Examples
Production Test Suite
Development Testing
CI/CD Integration
Import and Test
Next Steps
CLI Overview
Learn about Bruno CLI fundamentals
Running Tests
Practical guide to running API tests
Importing Collections
Import from OpenAPI and other formats
Installation
Install Bruno CLI in your environment