Skip to main content
The Requestly CLI lets you run collections, inspect environments, and list projects directly from your terminal or CI pipeline - no browser or desktop app required.

Installation

Download the binary for your platform, unzip it, and run it directly. The binary is self-contained with no additional dependencies. After downloading, unzip and make the binary executable:
To run it as browserstack-binary from any directory, move it onto your PATH. On macOS and Linux:
On Windows, move browserstack-binary.exe into a folder that is on your Path (or add its folder to the Path environment variable via System Properties → Environment Variables).
Some operating systems block execution of binaries downloaded from the internet by default. Run chmod +x browserstack-binary if you see a permission error.All examples in this guide assume the binary is on your PATH. If you skip the step above, run it with a path prefix (./browserstack-binary) from the folder where it lives.
All examples in this guide use browserstack-binary as the executable name. The actual filename after unzipping is platform-dependent (e.g. binary-macos-arm64 on macOS arm64) - rename it to match.

Invocation

Authentication

Cloud operations - fetching a collection by cloud ID, listing cloud projects, collections, and environments - require BrowserStack credentials set as environment variables: Both must be set together. Local filesystem runs, Postman JSON files, and URL-fetch targets do not require credentials.
To find your username and access key, open your BrowserStack account profile.

Commands

collection run

Run a collection or request. The target type is auto-detected - no explicit type flag needed.

Target detection

The CLI resolves the target in this order: If the target cannot be resolved, the CLI exits with code 1 and a descriptive error message.

Execution flags

Reporter flags

Missing export directories are created automatically. If a directory cannot be created, the CLI exits 1 after the run completes - tests still execute.
--reporter-omit-* flags affect the JSON and HTML reporters regardless of --verbose. In terminal output, they suppress the additional headers/bodies that --verbose would otherwise show.

Global flags

Exit codes


project list

List all projects the authenticated user is a member of.
Requires BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY.

collection list

List collections in a project.
Requires BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY.

environment list

List environments in a project (cloud or local).
Pass a local project path as the positional argument to list environments from the filesystem without credentials.

environment view

Show variable details for a specific environment.
Pass a local environment file path as the positional argument to inspect it without credentials.

Terminal output

The default cli reporter streams results in real time. Each request prints as it completes:
console.log() output from scripts appears between the request line and assertions, wrapped in dash-pipe delimiters:

Examples

Run a local Requestly project:
Run a specific collection within a project:
Run a Postman v2.1 file with JUnit output:
Run a specific folder from a Postman collection:
Run a collection from a URL:
Run a cloud collection with an environment:
Data-driven run (3 repetitions of a CSV file):
Bail on first failure with variable overrides:
All four reporters with sensitive headers stripped:
CI pipeline (JUnit output, fail fast, credentials from env):
List projects:
List collections in a project:
View an environment: