Appearance
Command Line Interface (CLI)
The BrowserStack Client project provides a unified, high-performance native Go-based CLI for interacting with all BrowserStack products. This standalone tool is designed for maximum performance, fast startup times, and environment flexibility.
Features
- Native Performance: Written in Go, providing fast execution and minimal resource footprint.
- Zero Dependencies: Standalone binaries that do not require Node.js, Python, or any other runtime on your system.
- Unified Interface: One tool to rule them all—Automate, App Automate, Screenshots, Accessibility, and more.
- Automated Local Testing: Built-in management for the
BrowserStackLocalbinary. - OpenAPI Powered: All commands and arguments are strictly derived from the official BrowserStack OpenAPI specifications.
Installation
Pre-compiled Binaries
Linux
x64 (AMD64)
bash
wget https://github.com/shirish87/browserstack-client/releases/download/v7.0.0/browserstack-client-linux-amd64 -O browserstack-client
chmod +x browserstack-clientARM64
bash
wget https://github.com/shirish87/browserstack-client/releases/download/v7.0.0/browserstack-client-linux-arm64 -O browserstack-client
chmod +x browserstack-clientmacOS
Apple Silicon (ARM64)
bash
wget https://github.com/shirish87/browserstack-client/releases/download/v7.0.0/browserstack-client-darwin-arm64 -O browserstack-client
chmod +x browserstack-clientIntel (x64)
bash
wget https://github.com/shirish87/browserstack-client/releases/download/v7.0.0/browserstack-client-darwin-amd64 -O browserstack-client
chmod +x browserstack-clientWindows (x64)
powershell
wget https://github.com/shirish87/browserstack-client/releases/download/v7.0.0/browserstack-client-windows-amd64.exe -OutFile browserstack-client.exeAfter downloading, move the binary to a directory in your PATH.
Global Configuration
The CLI looks for BrowserStack credentials in the following environment variables:
bash
export BROWSERSTACK_USERNAME="your_username"
export BROWSERSTACK_ACCESS_KEY="your_access_key"Usage Structure
bash
browserstack-client <product> <action> [args...]Supported Products
automateapp-automatescreenshotsaccessibilitywebsite-scannertest-managementtest-reportinglocal
Local Testing Features
The local product provides powerful wrappers around the BrowserStackLocal binary.
start [localIdentifier]: Starts a new BrowserStack Local instance.stop [localIdentifier]: Stops a running instance.list: Lists all active local testing identifiers.run-with [localIdentifier] -- <command>:- Automatically starts a local instance.
- Sets the
BROWSERSTACK_LOCAL_IDENTIFIERenvironment variable for your command. - Runs your command.
- Automatically cleans up and stops the local instance when your command finishes.
Examples
Local Testing
bash
# Start a tunnel (blocks until ready)
browserstack-client local start
# Start a named tunnel
browserstack-client local start my-tunnel
# List active tunnels
browserstack-client local list
# Stop a named tunnel
browserstack-client local stop my-tunnel
# Run a command inside a tunnel, then auto-stop
browserstack-client local run-with my-tunnel -- npm testAutomate
bash
# List all projects
browserstack-client automate list-projects
# Get details of a specific project
browserstack-client automate get-project <project-id>
# List sessions for a build
browserstack-client automate list-sessions <build-id>App Automate
bash
# Upload an Android app for Flutter testing
browserstack-client app-automate upload-flutter-android-app ./my-app.apk
# List uploaded apps
browserstack-client app-automate list-appsScreenshots
bash
# List all generated screenshots
browserstack-client screenshots list-screenshotsAccessibility
bash
# List all Workflow Analyzer reports
browserstack-client accessibility list-workflow-analyzer-reportsWebsite Scanner
bash
# List all scans
browserstack-client website-scanner list-website-scanner-scans
# List scans filtered by project and status
browserstack-client website-scanner list-website-scanner-scans <project-id> <status>
# Get a specific scan
browserstack-client website-scanner get-website-scanner-scan <proj_id>
# Create a new scan
browserstack-client website-scanner create-website-scanner-scan
# Trigger a scan run
browserstack-client website-scanner trigger-website-scanner-scan-run <project_id>
# List scan runs for a scan
browserstack-client website-scanner list-website-scanner-scan-runs <proj_id> [page] [page_size]
# Get scan run status
browserstack-client website-scanner list-website-scanner-scan-run-status <proj_id> <report_id>
# Get scan run summary
browserstack-client website-scanner get-website-scanner-scan-run-summary <proj_id> <report_id> [product]
# Manage auth configs
browserstack-client website-scanner list-website-scanner-auth-configs
browserstack-client website-scanner create-website-scanner-auth-configTest Management
bash
# List all Test Management projects
browserstack-client test-management list-projects
# List test runs for a project
browserstack-client test-management list-test-runs <project-id>Test Reporting & Analytics
bash
# Upload a JUnit XML report
browserstack-client test-reporting upload-report ./results.xml \
--project-name "My Project" \
--build-name "Build #42"
# Upload with optional metadata
browserstack-client test-reporting upload-report ./results.xml \
--project-name "My Project" \
--build-name "Build #42" \
--format junit \
--tags "regression, nightly" \
--ci "https://ci.example.com/builds/42"
# Upload an Allure report archive
browserstack-client test-reporting upload-report ./allure-results.zip \
--project-name "My Project" \
--build-name "Build #42" \
--format allure
# List projects
browserstack-client test-reporting list-projects
# Get the latest build for a project
browserstack-client test-reporting get-latest-build \
"My Project" "Build #42"Help and Version
- Help: Run
browserstack-client helpor<product> helpto see available actions and arguments. - Version: Run
browserstack-client versionto check the current version of the CLI.