BrowserStack Cypress CLI

1.36.4 · active · verified Wed Apr 22

The `browserstack-cypress-cli` is a command-line interface (CLI) tool designed by BrowserStack to enable running Cypress end-to-end tests on BrowserStack's cloud infrastructure. This allows developers to execute their Cypress test suites across a wide array of remote browsers and operating systems, which significantly expands testing coverage beyond local environments. Currently in public beta, the package (latest stable release v1.36.4 as of April 2026) receives frequent updates, often on a weekly or bi-weekly basis, with recent releases focusing on bug fixes, improved logging for Cucumber-Cypress tests, and enhanced dependency management. Its primary differentiator is providing seamless integration with BrowserStack Automate, offering features like parallel test execution, localhost tunneling, and comprehensive test reporting, which are crucial for CI/CD pipelines.

Common errors

Warnings

Install

Quickstart

Demonstrates how to install the CLI, initialize the configuration, and execute Cypress tests on BrowserStack's cloud platform.

# Install the BrowserStack Cypress CLI globally
npm install -g browserstack-cypress-cli

# Navigate to your Cypress project directory
cd my-cypress-project

# Generate a sample browserstack.json configuration file
browserstack-cypress init

# Edit browserstack.json to add your BrowserStack credentials and desired capabilities
# Example partial browserstack.json content:
/*
{
  "auth": {
    "username": "$BROWSERSTACK_USERNAME",
    ""access_key": "$BROWSERSTACK_ACCESS_KEY"
  },
  "browsers": [
    {
      "browser": "chrome",
      "os": "Windows 10",
      "versions": ["latest"]
    }
  ],
  "run_settings": {
    "cypress_config_file": "cypress.config.js",
    "npm_dependencies": {},
    "headless": true
  }
}
*/

# Run your Cypress tests on BrowserStack
browserstack-cypress run

view raw JSON →