Skip to main content

CLI Overview

Bruno CLI (bru) allows you to run your API collections from the command line, making it easy to:
  • Test APIs in different environments
  • Automate testing workflows
  • Integrate with CI/CD pipelines
  • Run tests in headless environments
The CLI reads the same .bru files you create in the Bruno desktop app, ensuring consistency between manual and automated testing.

Key Features

Environment Support

Switch between environments and override variables on the fly

Multiple Reporters

Export results as JSON, JUnit, or HTML for CI/CD integration

Flexible Execution

Run individual requests, folders, or entire collections recursively

Custom Certificates

Add custom CA certificates and client certificates for secure connections

Quick Start

Navigate to your collection directory and run all requests:
Run a specific request:
Run with a specific environment:

Common Use Cases

CI/CD Integration

Generate JUnit reports for your CI/CD pipeline:

Environment Testing

Test against multiple environments with overrides:

Selective Testing

Run only requests that have tests:

Filtered Execution

Run requests with specific tags:

Exit Codes

Bruno CLI returns specific exit codes for scripting and automation:

Next Steps

Installation

Install Bruno CLI globally or in your project

Running Tests

Learn how to run API tests with various options

CLI Options

Complete reference of all CLI flags and options

Importing Collections

Import collections from OpenAPI and other formats