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. This example is for macOS arm64:
mv line. On Linux in particular the archive is named linux but the file inside is named linuxstatic:
To run it as
browserstack-binary from any directory, move it onto your PATH. On macOS and Linux:
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.browserstack-binary as the executable name. Rename the file you extracted to match, using the table above to find its real name.
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.
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.
Report to Test Reporting and Analytics
Thetra reporter uploads your run results to BrowserStack Test Reporting & Analytics, so CI runs show up alongside your other BrowserStack test reports instead of only in the pipeline log.
It is opt-in. Add tra to --reporters:
tra can only be enabled with the --reporters flag. Listing it in a .requestlyrc file has no effect, because the reporter resolves your credentials at run time rather than from the config file.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.
Configuration file
Instead of repeating the same flags on every run, commit a.requestlyrc file next to your collection. collection run picks it up automatically, so your team and your CI pipeline share one set of defaults.
Place the file in your target’s directory: the directory you pass to collection run, or, if you pass a collection file, the directory that file lives in. Two filenames are supported:
If both exist,
.requestlyrc wins.
.requestlyrc
Supported keys
Numeric values must be whole numbers and cannot be negative.
A relative
export path is resolved from the directory you run the command in, not from the directory holding the .requestlyrc. In CI, where those are usually the same directory, this makes no difference.
Which value wins
When the same setting is specified in more than one place, the CLI uses the first one it finds:- The flag you passed on the command line.
- Your
.requestlyrcfile. - A run configuration saved with the collection (iteration count and delay only).
- The built-in default.
.requestlyrc sets your team’s baseline, and any flag you pass overrides it for that one run.
The
tra reporter is the one setting a .requestlyrc cannot turn on. A kind: tra entry is dropped without a warning, because it is a valid reporter name, so pass -r tra on the command line instead.If the file has a problem
- An unknown top-level key prints a warning naming the key, and the run continues. This is usually a typo.
- A malformed file (invalid YAML or JSON) stops the run and exits
1before any request is sent. - An individual value of the wrong type is ignored, and the CLI falls back to the flag, saved config, or default for that setting.
Terminal output
The defaultcli 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:

