{
  "doc": {
    "id": "app/references/command-line",
    "title": "Command line interface (CLI) commands and options in Cypress",
    "description": "Learn how to run Cypress from the command line using npm, Yarn, or pnpm.",
    "section": "app",
    "source_path": "/llm/markdown/app/references/command-line.md",
    "version": "e6c8d867c21227247f14714fb5690c7c018983c5",
    "updated_at": "2026-08-08T12:39:37.868Z",
    "headings": [
      {
        "id": "app/references/command-line#command-line",
        "text": "Command Line",
        "level": 1
      },
      {
        "id": "app/references/command-line#how-to-run-commands",
        "text": "How to run commands",
        "level": 2
      },
      {
        "id": "app/references/command-line#using-scripts",
        "text": "Using scripts",
        "level": 2
      },
      {
        "id": "app/references/command-line#extending-script-options",
        "text": "Extending script options",
        "level": 3
      },
      {
        "id": "app/references/command-line#commands",
        "text": "Commands",
        "level": 2
      },
      {
        "id": "app/references/command-line#cypress-run",
        "text": "cypress run",
        "level": 3
      },
      {
        "id": "app/references/command-line#options",
        "text": "Options",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-auto-cancel-after-failures-autocancelafterfailures",
        "text": "cypress run --auto-cancel-after-failures <autoCancelAfterFailures>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-browser-browser-name-or-path",
        "text": "cypress run --browser <browser-name-or-path>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-ci-build-id-id",
        "text": "cypress run --ci-build-id <id>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-config-config",
        "text": "cypress run --config <config>",
        "level": 4
      },
      {
        "id": "app/references/command-line#real-world-example",
        "text": "Real World Example",
        "level": 5
      },
      {
        "id": "app/references/command-line#cypress-run-config-file-configuration-file",
        "text": "cypress run --config-file <configuration-file>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-env-env",
        "text": "cypress run --env <env>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-expose-expose",
        "text": "cypress run --expose <expose>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-group-name",
        "text": "cypress run --group <name>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-headed",
        "text": "cypress run --headed",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-no-exit",
        "text": "cypress run --no-exit",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-no-runner-ui",
        "text": "cypress run --no-runner-ui",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-parallel",
        "text": "cypress run --parallel",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-pass-with-no-tests",
        "text": "cypress run --pass-with-no-tests",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-port-port",
        "text": "cypress run --port <port>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-posix-exit-codes",
        "text": "cypress run --posix-exit-codes",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-project-project-path",
        "text": "cypress run --project <project-path>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-quiet",
        "text": "cypress run --quiet",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-record-key-record-key",
        "text": "cypress run --record --key <record-key>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-reporter-reporter",
        "text": "cypress run --reporter <reporter>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-runner-ui",
        "text": "cypress run --runner-ui",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-spec-spec",
        "text": "cypress run --spec <spec>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-run-tag-tag",
        "text": "cypress run --tag <tag>",
        "level": 4
      },
      {
        "id": "app/references/command-line#exit-code",
        "text": "Exit code",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-open",
        "text": "cypress open",
        "level": 3
      },
      {
        "id": "app/references/command-line#options",
        "text": "Options:",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-open-browser-browser-path",
        "text": "cypress open --browser <browser-path>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-open-config-config",
        "text": "cypress open --config <config>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-open-config-file-configuration-file",
        "text": "cypress open --config-file <configuration-file>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-open-env-env",
        "text": "cypress open --env <env>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-open-expose-expose",
        "text": "cypress open --expose <expose>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-open-global",
        "text": "cypress open --global",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-open-port-port",
        "text": "cypress open --port <port>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-open-project-project-path",
        "text": "cypress open --project <project-path>",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-info",
        "text": "cypress info",
        "level": 3
      },
      {
        "id": "app/references/command-line#cypress-install",
        "text": "cypress install",
        "level": 3
      },
      {
        "id": "app/references/command-line#options",
        "text": "Options",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-install-force",
        "text": "cypress install --force",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-verify",
        "text": "cypress verify",
        "level": 3
      },
      {
        "id": "app/references/command-line#cypress-version",
        "text": "cypress version",
        "level": 3
      },
      {
        "id": "app/references/command-line#cypress-cache-command",
        "text": "cypress cache [command]",
        "level": 3
      },
      {
        "id": "app/references/command-line#cypress-cache-path",
        "text": "cypress cache path",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-cache-list",
        "text": "cypress cache list",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-cache-clear",
        "text": "cypress cache clear",
        "level": 4
      },
      {
        "id": "app/references/command-line#cypress-cache-prune",
        "text": "cypress cache prune",
        "level": 4
      },
      {
        "id": "app/references/command-line#debugging-commands",
        "text": "Debugging commands",
        "level": 2
      },
      {
        "id": "app/references/command-line#enable-debug-logs",
        "text": "Enable Debug Logs",
        "level": 3
      },
      {
        "id": "app/references/command-line#history",
        "text": "History",
        "level": 2
      }
    ]
  },
  "chunks": [
    {
      "id": "app/references/command-line#how-to-run-commands",
      "doc_id": "app/references/command-line",
      "heading": "How to run commands",
      "heading_level": 2,
      "content_markdown": "## How to run commands\n\nYou can run Cypress from your **project root** using a command which depends on the package manager you are using: npm, Yarn, pnpm or Bun. For example, you would prefix the command [cypress run](#cypress-run) as shown:\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nnpx cypress run\n```\n\n```\nyarn cypress run\n```\n\n```\npnpm cypress run\n```\n\n```\nbunx cypress run\n```\n\nAdd any required [options](#Options) to the end of the command line. As an example, if you want to run tests in headless mode from a single spec file and record the results with Cypress Cloud, the command should be:\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nnpx cypress run --record --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\n```\nyarn cypress run --record --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\n```\npnpm cypress run --record --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\n```\nbunx cypress run --record --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\n**PowerShell**\n\nWhen `cypress run` [options](#Options) or `cypress open` [options](#Options-1) are specified with multiple values separated by commas, such as for `--config` or `--env` options, and you are using PowerShell on Windows, you may need to surround the key/value pairs with quotes, for example: `--env \"host=api.dev.local,port=4222\"`.\n",
      "section": "app",
      "anchors": [
        "how-to-run-commands"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 257
    },
    {
      "id": "app/references/command-line#using-scripts",
      "doc_id": "app/references/command-line",
      "heading": "Using scripts",
      "heading_level": 2,
      "content_markdown": "## Using scripts\n\nCypress command strings can be saved as scripts for reuse.\n\nLet's say you often need to run Cypress E2E tests in headless mode using the Chrome browser. You can add the corresponding command `cypress run --browser chrome` to the `scripts` object in your `package.json` file and use the name `e2e:chrome` to identify it.\n\n```\n{  \"scripts\": {    \"e2e:chrome\": \"cypress run --browser chrome\"  }}\n```\n\nRunning the script `e2e:chrome` as follows will run the command you defined:\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nnpm run e2e:chrome\n```\n\n```\nyarn e2e:chrome\n```\n\n```\npnpm e2e:chrome\n```\n\n```\nbun run e2e:chrome\n```\n\n**Best Practice**\n\nDon't use `cypress` as the exact name of a script, especially if you use Yarn as package manager. When running commands on the Cypress binary (e.g. `yarn cypress verify`), Yarn will reference the script of the same name instead and Cypress CLI commands may not work as expected.\n\n### Extending script options\n\nYou do not have to define a new script for every variation of a command string you need. You can extend a script with additional options.\n\nLet's say that when you ran the full set of tests with the script `e2e:chrome` it showed a failure in one test spec `cypress/e2e/my-spec.cy.js`. You corrected the problem and would like to re-run the tests only for the test spec which previously failed.\n\nThe option [`--spec`](#cypress-run-spec-lt-spec-gt) allows you to specify which test specs to run, so you can add this to the command after the script name `e2e:chrome`:\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nnpm run e2e:chrome -- --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\n```\nyarn e2e:chrome --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\n```\npnpm e2e:chrome --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\n```\nbun run e2e:chrome --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\nRefer to each package manager's documentation for full details of command and script usage:\n\n*   [npm CLI](https://docs.npmjs.com/cli/)  \n    When adding Cypress [options](#Options) after a script name called from `npm`, you need to pass the command's arguments using the `--` string (see [`npm-run-script`](https://docs.npmjs.com/cli/run-script.html)).\n*   [Yarn CLI](https://classic.yarnpkg.com/lang/en/docs/cli/)\n*   [pnpm CLI](https://pnpm.io/pnpm-cli)\n*   [Bun CLI](https://bun.sh/docs/cli/run)\n",
      "section": "app",
      "anchors": [
        "using-scripts"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 451
    },
    {
      "id": "app/references/command-line#extending-script-options",
      "doc_id": "app/references/command-line",
      "heading": "Extending script options",
      "heading_level": 3,
      "content_markdown": "### Extending script options\n\nYou do not have to define a new script for every variation of a command string you need. You can extend a script with additional options.\n\nLet's say that when you ran the full set of tests with the script `e2e:chrome` it showed a failure in one test spec `cypress/e2e/my-spec.cy.js`. You corrected the problem and would like to re-run the tests only for the test spec which previously failed.\n\nThe option [`--spec`](#cypress-run-spec-lt-spec-gt) allows you to specify which test specs to run, so you can add this to the command after the script name `e2e:chrome`:\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nnpm run e2e:chrome -- --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\n```\nyarn e2e:chrome --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\n```\npnpm e2e:chrome --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\n```\nbun run e2e:chrome --spec \"cypress/e2e/my-spec.cy.js\"\n```\n\nRefer to each package manager's documentation for full details of command and script usage:\n\n*   [npm CLI](https://docs.npmjs.com/cli/)  \n    When adding Cypress [options](#Options) after a script name called from `npm`, you need to pass the command's arguments using the `--` string (see [`npm-run-script`](https://docs.npmjs.com/cli/run-script.html)).\n*   [Yarn CLI](https://classic.yarnpkg.com/lang/en/docs/cli/)\n*   [pnpm CLI](https://pnpm.io/pnpm-cli)\n*   [Bun CLI](https://bun.sh/docs/cli/run)\n",
      "section": "app",
      "anchors": [
        "extending-script-options"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 244
    },
    {
      "id": "app/references/command-line#commands",
      "doc_id": "app/references/command-line",
      "heading": "Commands",
      "heading_level": 2,
      "content_markdown": "## Commands\n\nThe prefix required to run `cypress` is not shown in the list of commands below. You need to add the prefix `npx`, `yarn` or `pnpm` to the command line, corresponding to the package manager you are using. See [How to run commands](#How-to-run-commands).\n\n### `cypress run`\n\nRuns Cypress tests to completion. By default, `cypress run` will run all tests headlessly.\n\n```\ncypress run [options]\n```\n\n#### Options\n\n| Option | Description |\n| --- | --- |\n| `--auto-cancel-after-failures` | [Overrides the Cloud project-level configuration to set the failed test threshold for auto cancellation or to disable auto cancellation when recording to the Cloud](#auto-cancel-after-runs) |\n| `--browser`, `-b` | [Run Cypress in the browser with the given name. If a filesystem path is supplied, Cypress will attempt to use the browser at that path.](#cypress-run-browser-lt-browser-name-or-path-gt) |\n| `--ci-build-id` | [Specify a unique identifier for a run to enable grouping or parallelization.](#cypress-run-ci-build-id-lt-id-gt) |\n| `--component` | [Run component tests](/llm/markdown/app/core-concepts/testing-types.md#What-is-Component-Testing) |\n| `--config`, `-c` | [Specify configuration](#cypress-run-config-lt-config-gt) |\n| `--config-file`, `-C` | [Specify configuration file](#cypress-run-config-file-lt-configuration-file-gt) |\n| `--e2e` | Run end to end tests (default) |\n| `--env`, `-e` | [Specify secret environment variables](#cypress-run-env-lt-env-gt) |\n| `--expose`, `-x` | [Specify public configuration values](#cypress-run-expose-lt-expose-gt) |\n| `--group` | [Group recorded tests together under a single run](#cypress-run-group-lt-name-gt) |\n| `--headed` | [Displays the browser instead of running headlessly](#cypress-run-headed) |\n| `--headless` | Hide the browser instead of running headed (default during `cypress run`) |\n| `--help`, `-h` | Output usage information |\n| `--key`, `-k` | [Specify your secret record key](#cypress-run-record-key-lt-record-key-gt) |\n| `--no-exit` | [Keep Cypress open after tests in a spec file run](#cypress-run-no-exit) |\n| `--no-runner-ui` | [Hides the Cypress Runner UI](#cypress-run-no-runner-ui) |\n| `--parallel` | [Run recorded specs in parallel across multiple machines](#cypress-run-parallel) |\n| `--pass-with-no-tests` | [Exits with success when no spec files are found](#cypress-run-pass-with-no-tests) |\n| `--port`,`-p` | [Override default port](#cypress-run-port-lt-port-gt) |\n| `--posix-exit-codes` | [Exit with a POSIX-compliant exit code](#cypress-run-posix-exit-codes) rather than the number of failed tests. |\n| `--project`, `-P` | [Path to a specific project](#cypress-run-project-lt-project-path-gt) |\n| `--quiet`, `-q` | [Reduce output to `stdout`](#cypress-run-quiet) |\n| `--record` | [Whether to record the test run](#cypress-run-record-key-lt-record-key-gt) |\n| `--reporter`, `-r` | [Specify a Mocha reporter](#cypress-run-reporter-lt-reporter-gt) |\n| `--reporter-options`, `-o` | [Specify Mocha reporter options](#cypress-run-reporter-lt-reporter-gt) |\n| `--runner-ui` | [Displays the Cypress Runner UI. Useful for when Test Replay is enabled and you would still like the Cypress Runner UI to be displayed for screenshots and video](#cypress-run-runner-ui) |\n| `--spec`, `-s` | [Specify the spec files to run](#cypress-run-spec-lt-spec-gt) |\n| `--tag`, `-t` | [Identify a run with a tag or tags](#cypress-run-tag-lt-tag-gt) |\n\n#### `cypress run --auto-cancel-after-failures <autoCancelAfterFailures>`\n\nThe \"autoCancelAfterFailures\" argument is the number of times tests can fail before the run is canceled\n\n```\ncypress run --record --key <<your_record_key>> --auto-cancel-after-failures 1\n```\n\nYou can also specify `false` for the value to disable Auto Cancellation for the run:\n\n```\ncypress run --record --key <<your_record_key>> --auto-cancel-after-failures false\n```\n\n#### `cypress run --browser <browser-name-or-path>`\n\n```\ncypress run --browser chrome\n```\n\nThe \"browser\" argument can be set to `chrome`, `chromium`, `edge`, `electron`, `firefox` to launch a browser detected on your system. Cypress will attempt to automatically find the installed browser for you.\n\nTo launch non-stable browsers, add a colon and the desired release channel. For example, to launch Chrome Canary, use `chrome:canary`.\n\nYou can also choose a browser by supplying a path:\n\n```\ncypress run --browser /usr/bin/chromium\n```\n\n[Having trouble with browser detection? Check out our troubleshooting guide](/llm/markdown/app/references/troubleshooting.md#Launching-browsers)\n\n#### `cypress run --ci-build-id <id>`\n\nThis value should be automatically detected for most CI providers and is unnecessary to define unless Cypress is unable to determine it.\n\nTypically, this is defined as a system environment variable within your CI provider, defining a unique \"build\" or \"run\".\n\n```\ncypress run --ci-build-id BUILD_NUMBER\n```\n\nOnly valid when providing a `--group` or `--parallel` flag. Read our [parallelization](/llm/markdown/cloud/features/smart-orchestration/parallelization.md) documentation to learn more.\n\n#### `cypress run --config <config>`\n\nSet [configuration](/llm/markdown/app/references/configuration.md) values. Separate multiple values with commas. The values set here override any values set in your configuration file.\n\n```\ncypress run --config pageLoadTimeout=100000,watchForFileChanges=false\n```\n\nFor more complex configuration objects, you may want to consider passing a [JSON.stringified](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) object surrounded by single quotes.\n\nHere, we're passing in the configuration for component spec files.\n\n```\ncypress run --config '{\"watchForFileChanges\":false,\"specPattern\":[\"**/*.cy.js\",\"**/*.cy.ts\"]}'\n```\n\n##### Real World Example\n\nThe Cypress [Real World App (RWA)](https://github.com/cypress-io/cypress-realworld-app) uses `--config` flag to easily specify [viewport](/llm/markdown/app/references/configuration.md#Viewport) sizes for responsive testing locally and in dedicated CI jobs.\n\nExamples:\n\n*   [npm scripts](https://github.com/cypress-io/cypress-realworld-app/blob/07a6483dfe7ee44823380832b0b23a4dacd72504/package.json#L120) to run Cypress in mobile viewport.\n\n*   [Circle CI job configuration](https://github.com/cypress-io/cypress-realworld-app/blob/07a6483dfe7ee44823380832b0b23a4dacd72504/.circleci/config.yml#L82-L100) for running test suites in mobile viewport.\n\n#### `cypress run --config-file <configuration-file>`\n\nYou can specify a path to a file where [Cypress configuration](/llm/markdown/app/references/configuration.md) values are set.\n\n```\ncypress run --config-file tests/cypress.config.js\n```\n\n#### `cypress run --env <env>`\n\n**Security Warning**\n\nSecrets passed via CLI may appear in CI logs. For production use, prefer setting secrets via your CI/CD platform's secret management system.\n\nSet secret [environment variables](/llm/markdown/app/guides/environment-variables.md) for use in your tests via [`cy.env()`](/llm/markdown/api/commands/env.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress run --env apiKey=secret-key-12345\n```\n\nPass several variables using commas and no spaces. Numbers are automatically converted from strings.\n\n```\ncypress run --env apiKey=secret-key-12345,apiUrl=https://api.example.com\n```\n\nPass an object as a JSON in a string.\n\n```\ncypress run --env credentials='{\"apiKey\":\"secret-key-12345\",\"dbPassword\":\"secure-password\"}'\n```\n\n#### `cypress run --expose <expose>`\n\nSet public configuration values for use in your tests via [`Cypress.expose()`](/llm/markdown/api/cypress-api/expose.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress run --expose apiVersion=v2,featureFlag=true\n```\n\n#### `cypress run --group <name>`\n\nGroup recorded tests together under a single run.\n\n```\ncypress run --group develop-env\n```\n\nYou can add multiple groups to the same run by passing a different name. This can help distinguish groups of specs from each other.\n\n```\ncypress run --group admin-tests --spec 'cypress/e2e/admin/**/*'\n```\n\n```\ncypress run --group user-tests --spec 'cypress/e2e/user/**/*'\n```\n\nSpecifying the `--ci-build-id` may also be necessary.\n\n[Read more about grouping.](/llm/markdown/cloud/features/smart-orchestration/parallelization.md#Grouping-test-runs)\n\n#### `cypress run --headed`\n\nBy default, Cypress will run tests headlessly during `cypress run`.\n\nPassing `--headed` will force the browser to be shown. This matches how you run any browser via `cypress open`.\n\n```\ncypress run --headed\n```\n\n#### `cypress run --no-exit`\n\nTo prevent Cypress from exiting after running tests in a spec file, use `--no-exit`.\n\nYou can pass `--headed --no-exit` in order to view the **command log** or have access to **developer tools** after a `spec` has run.\n\n```\ncypress run --headed --no-exit\n```\n\n#### `cypress run --no-runner-ui`\n\nTo prevent Cypress from rendering the Runner UI, use `--no-runner-ui`.\n\n```\ncypress run --no-runner-ui\n```\n\n#### `cypress run --parallel`\n\nRun recorded specs in [parallel](/llm/markdown/cloud/features/smart-orchestration/parallelization.md) across multiple machines.\n\n```\ncypress run --record --parallel\n```\n\nYou can additionally pass a `--group` flag so this shows up as a named [group](/llm/markdown/cloud/features/smart-orchestration/parallelization.md#Grouping-test-runs).\n\n```\ncypress run --record --parallel --group e2e-staging-specs\n```\n\nRead our [parallelization](/llm/markdown/cloud/features/smart-orchestration/parallelization.md) documentation to learn more.\n\n#### `cypress run --pass-with-no-tests`\n\nExits with a success code when no spec files are found. Useful in CI pipelines where specs may be conditionally generated or filtered out at runtime.\n\n```\ncypress run --pass-with-no-tests\n```\n\n#### `cypress run --port <port>`\n\n```\ncypress run --port 8080\n```\n\n#### `cypress run --posix-exit-codes`\n\nThis changes the default behavior of Cypress regarding exit codes. This flag causes Cypress to exit with POSIX exit code of 1 when there are test failures or if Cypress could not run, rather than the number of tests that failed. It can return additional POSIX-compliant exit codes for other scenarios as well. See the [Exit Code section](/llm/markdown/app/references/command-line.md#Exit-code) for a comprehensive reference of Cypress exit codes.\n\n```\ncypress run --posix-exit-codes\n```\n\n#### `cypress run --project <project-path>`\n\nBy default, Cypress expects your `cypress.config.js` (or `cypress.config.ts`) to be found in the current working directory. Use `--project` to point Cypress at a different directory. This is useful when you have multiple Cypress projects in one repository and want to run a specific one without changing your working directory.\n\n```\ncypress run --project ./some/nested/folder\n```\n\n#### `cypress run --quiet`\n\nTo reduce the output from Cypress printed to `stdout`, use `--quiet`.\n\n```\ncypress run --quiet\n```\n\nIf passed, Cypress will only print output to `stdout` from the [built-in](/llm/markdown/app/tooling/reporters.md#Built-in-reporters) default [Mocha spec reporter](https://mochajs.org/#spec), or from any other configured [Mocha reporter](/llm/markdown/app/tooling/reporters.md).\n\n#### `cypress run --record --key <record-key>`\n\nRecord your test results to [Cypress Cloud](/llm/markdown/cloud/get-started/introduction.md). For this option to work you must first [set up your project to record](/llm/markdown/cloud/get-started/setup.md#Setup), make sure your `projectId` is set in your [Cypress configuration file](/llm/markdown/app/references/configuration.md#Configuration-File), and append your **Record Key** to the command.\n\n```\ncypress run --record --key <record_key>\n```\n\nIf you set the **Record Key** as the environment variable `CYPRESS_RECORD_KEY`, you can omit the `--key` flag. You may want to set this environment variable when running in [Continuous Integration](/llm/markdown/app/continuous-integration/overview.md).\n\n```\nexport CYPRESS_RECORD_KEY=abc-key-123\n```\n\nNow you can omit the `--key` flag.\n\n```\ncypress run --record\n```\n\n`CYPRESS_RECORD_KEY` must be set as an actual operating system environment variable (for example via `export CYPRESS_RECORD_KEY=...` or your CI provider's secrets). Cypress reads it directly from your shell or CI environment — it is **not** read from `cypress.env.json` or the `env` block of your Cypress configuration, since those only populate test environment variables. If you don't want to set an environment variable, pass the key inline with the `--key` flag instead.\n\nFor more information on recording runs, see the [Cypress Cloud setup instructions](/llm/markdown/cloud/get-started/setup.md#Setup). For an in-depth explanation of how Cypress uses your record key and `projectId` to save your test results to Cypress Cloud, see the [Identification section](/llm/markdown/cloud/account-management/projects.md#Identification).\n\n#### `cypress run --reporter <reporter>`\n\nYou can tests specifying a specific [Mocha reporter](/llm/markdown/app/tooling/reporters.md).\n\n```\ncypress run --reporter json\n```\n\nYou can specify reporter options using the `--reporter-options <reporter-options>` flag.\n\n```\ncypress run --reporter junit --reporter-options mochaFile=result.xml,toConsole=true\n```\n\n#### `cypress run --runner-ui`\n\nTo force Cypress to render the Runner UI, use `--runner-ui`.\n\n```\ncypress run --runner-ui\n```\n\nUseful for when [Test Replay](/llm/markdown/cloud/features/test-replay.md) is enabled and you would still like the Runner UI to be rendered for screenshots and video.\n\n#### `cypress run --spec <spec>`\n\nRun tests specifying a single test file to run instead of all tests. The spec path should be an absolute path or can be relative to the current working directory.\n\n`--spec` only runs specs that **also match the configured [`specPattern`](/llm/markdown/app/references/configuration.md#e2e)**. Specs located outside the configured `specPattern` will not be found. See [Test files not found when using `spec` parameter](/llm/markdown/app/references/configuration.md#Test-files-not-found-when-using-spec-parameter) for details.\n\n```\ncypress run --spec \"cypress/e2e/examples/actions.cy.js\"\n```\n\nRun tests within the folder matching the glob _(Note: Using double quotes is strongly recommended)_.\n\n```\ncypress run --spec \"cypress/e2e/login/**/*\"\n```\n\nRun tests specifying multiple test files to run.\n\n```\ncypress run --spec \"cypress/e2e/examples/actions.cy.js,cypress/e2e/examples/files.cy.js\"\n```\n\nUse in combination with `--project` parameter. Imagine the Cypress tests are in a subfolder `tests/e2e` of the current project:\n\n```\napp/  node_modules/  package.json  tests/    unit/    e2e/      cypress/        e2e/          spec.cy.js      cypress.config.js\n```\n\nIf we are in the `app` folder, we can run the specs using the following command\n\n```\ncypress run --project tests/e2e --spec ./tests/e2e/cypress/e2e/spec.cy.js\n```\n\n#### `cypress run --tag <tag>`\n\nAdd a tag or tags to the recorded run. This can be used to help identify separate runs when displayed in Cypress Cloud.\n\n```\ncypress run  --record --tag \"staging\"\n```\n\nGive a run multiple tags.\n\n```\ncypress run --record --tag \"production,nightly\"\n```\n\nCypress Cloud will display any tags sent with the appropriate run.\n\nTags are also useful for surfacing environment details that Cypress Cloud does not record on its own, such as the Node.js version a run used. By tagging runs with these values you can easily differentiate runs that were executed against different versions in the same matrix. For example, when testing across multiple Node.js versions in CI you can include the version in the tags:\n\n```\ncypress run --record --tag \"node-${nodeVersion}\"\n```\n\nThis makes runs that use the same spec set but a different Node.js version (or any other build/environment detail Cypress Cloud does not capture) easy to tell apart in Cypress Cloud.\n\n**App Quality Profiles**: If you use Cypress Cloud's [accessibility](/llm/markdown/accessibility/get-started/introduction.md) and [UI Coverage reporting](/llm/markdown/accessibility/get-started/introduction.md), a run tag can be mapped to [App Quality Profiles](/llm/markdown/accessibility/configuration/profiles.md) to automatically apply different configuration settings for different types of runs.\n\n#### Exit code\n\nCypress supports two different exit code behaviors. The default behavior is similar to that of Mocha, but is not POSIX compliant: reserved exit codes can be returned for certain conditions. As well, the default behavior can return a false negative when there are a number of tests that fail in multiples of 256: most terminals will apply modulo 256 to any exit code larger than 255.\n\nPOSIX compliant exit codes are available via the `--posix-exit-codes` flag. When this flag is passed, additional conditions can be returned that are not possible with the default behavior, including when Cypress fails due to network errors when connections to Cypress Cloud are required, such as in `--record` or `--parallel` runs.\n\nWhen using POSIX compliant exit codes, the number of failed tests can be determined from the [Module API](/llm/markdown/app/references/module-api.md) or [structured reporter data](/llm/markdown/app/tooling/reporters.md).\n\n| Exit Condition | POSIX Exit Code (with `--posix-exit-codes`) | Default Exit Code (without `--posix-exit-codes`) |\n| --- | --- | --- |\n| All tests pass | 0 | 0 |\n| _n_ tests fail | 1 | _n_ |\n| Cypress could not run due to a network error when connections to Cypress Cloud are required | 112 | 1 |\n| Cypress could not run for any other reason, including no spec files found | 1 | 1 |\n\n### `cypress open`\n\nOpens Cypress.\n\n```\ncypress open [options]\n```\n\n#### Options:\n\nOptions passed to `cypress open` will automatically be applied to the project you open. These persist on all projects until you quit Cypress. These options will also override values in the Cypress configuration file.\n\nBy passing `--browser` and `--e2e` or `--component` when launching a project, you can open Cypress and launch the browser at the same time. If passing the `--browser` flag alone, the browser will launch automatically after being guided through project and/or testing type selection. Otherwise, you will be guided through selecting a browser, project, and/or testing type.\n\n| Option | Description |\n| --- | --- |\n| `--browser`, `-b` | [Run Cypress in the browser with the given name. If a filesystem path is supplied, Cypress will attempt to use the browser at that path.](#cypress-open-browser-lt-browser-path-gt) |\n| `--component` | [Open in component testing mode](/llm/markdown/app/core-concepts/testing-types.md#What-is-Component-Testing) |\n| `--config`, `-c` | [Specify configuration](#cypress-open-config-lt-config-gt) |\n| `--config-file`, `-C` | [Specify configuration file](#cypress-open-config-file-lt-configuration-file-gt) |\n| `--detached`, `-d` | Open Cypress in detached mode |\n| `--e2e` | Open in end to end testing mode (default) |\n| `--env`, `-e` | [Specify secret environment variables](#cypress-open-env-lt-env-gt) |\n| `--expose`, `-x` | [Specify public configuration values](#cypress-open-expose-lt-expose-gt) |\n| `--global` | [Open in global mode](#cypress-open-global) |\n| `--help`, `-h` | Output usage information |\n| `--port`, `-p` | [Override default port](#cypress-open-port-lt-port-gt) |\n| `--project`, `-P` | [Path to a specific project](#cypress-open-project-lt-project-path-gt) |\n\n#### `cypress open --browser <browser-path>`\n\nBy default, Cypress will automatically find and allow you to use the browsers installed on your system.\n\nThe \"browser\" option allows you to specify the path to a custom browser to use with Cypress:\n\n```\ncypress open --browser /usr/bin/chromium\n```\n\nIf found, the specified browser will be added to the list of available browsers.\n\nCurrently, only browsers in the Chrome family (including the new Chromium-based Microsoft Edge and Brave) and Firefox are supported.\n\n[Having trouble launching a browser? Check out our troubleshooting guide](/llm/markdown/app/references/troubleshooting.md#Launching-browsers)\n\n#### `cypress open --config <config>`\n\nSet [configuration](/llm/markdown/app/references/configuration.md) values. Separate multiple values with a comma. The values set here override any values set in your configuration file.\n\n```\ncypress open --config pageLoadTimeout=100000,watchForFileChanges=false\n```\n\nFor more complex configuration objects, you may want to consider passing a [JSON.stringified](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) object.\n\nHere, we're passing in the configuration for component spec files.\n\n```\ncypress open --config \"{\\\"watchForFileChanges\\\":false,\\\"specPattern\\\":[\\\"**/*.cy.js\\\",\\\"**/*.cy.ts\\\"]}\"\n```\n\n#### `cypress open --config-file <configuration-file>`\n\nYou can specify a path to a file where [Cypress configuration](/llm/markdown/app/references/configuration.md) values are set.\n\n```\ncypress open --config-file tests/cypress.config.js\n```\n\n#### `cypress open --env <env>`\n\n**Security Warning**\n\nSecrets passed via CLI may appear in CI logs. For production use, prefer setting secrets via your CI/CD platform's secret management system.\n\nSet secret [environment variables](/llm/markdown/app/guides/environment-variables.md) for use in your tests via [`cy.env()`](/llm/markdown/api/commands/env.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress open --env apiKey=secret-key-12345\n```\n\nPass several variables using commas and no spaces. Numbers are automatically converted from strings.\n\n```\ncypress open --env apiKey=secret-key-12345,apiUrl=https://api.example.com\n```\n\nPass an object as a JSON in a string.\n\n```\ncypress open --env credentials='{\"apiKey\":\"secret-key-12345\",\"dbPassword\":\"secure-password\"}'\n```\n\n#### `cypress open --expose <expose>`\n\nSet public configuration values for use in your tests via [`Cypress.expose()`](/llm/markdown/api/cypress-api/expose.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress open --expose apiVersion=v2,featureFlag=true\n```\n\n#### `cypress open --global`\n\nOpening Cypress in global mode is useful if you have multiple nested projects but want to share a single global installation of Cypress. In this case you can add each nested project to the Cypress in global mode, thus giving you a nice UI to switch between them.\n\n```\ncypress open --global\n```\n\n#### `cypress open --port <port>`\n\n```\ncypress open --port 8080\n```\n\n#### `cypress open --project <project-path>`\n\nBy default, Cypress looks for your `cypress.config.js` (or `cypress.config.ts`) in the current working directory. Use `--project` to open Cypress for a project located in a different directory. This is useful when you have multiple Cypress projects in one repository and want to open a specific one without changing your working directory.\n\n```\ncypress open --project ./some/nested/folder\n```\n\n### `cypress info`\n\nPrints information about Cypress and the current environment such as:\n\n*   A list of browsers Cypress detected on the machine.\n*   Any environment variables that control [proxy configuration](/llm/markdown/app/references/proxy-configuration.md).\n*   Any environment variables that start with the `CYPRESS` prefix (with sensitive variables like [record key](/llm/markdown/cloud/account-management/projects.md#Record-key) masked for security).\n*   The location where run-time data is stored.\n*   The location where the Cypress binary is cached.\n*   Operating system information.\n*   System memory including free space.\n\n```\ncypress infoDisplaying Cypress info...Detected 2 browsers installed:1. Chrome  - Name: chrome  - Channel: stable  - Version: 79.0.3945.130  - Executable: /path/to/google-chrome  - Profile: /user/profile/folder/for/google-chrome2. Firefox Nightly  - Name: firefox  - Channel: nightly  - Version: 74.0a1  - Executable: /path/to/firefoxNote: to run these browsers, pass <name>:<channel> to the '--browser' fieldExamples:- cypress run --browser firefox:nightly- cypress run --browser chromeLearn More: https://on.cypress.io/launching-browsersProxy Settings: none detectedEnvironment Variables: none detectedApplication Data: /path/to/app/data/cypress/cy/developmentBrowser Profiles: /path/to/app/data/cypress/cy/development/browsersBinary Caches: /user/profile/path/.cache/CypressCypress Version: 4.1.0System Platform: darwin (19.2.0)System Memory: 17.2 GB free 670 MB\n```\n\n**Tip:** set [DEBUG environment variable](/llm/markdown/app/references/troubleshooting.md#Print-DEBUG-logs) to `cypress:launcher:*` when running `cypress info` to troubleshoot browser detection.\n\n### `cypress install`\n\nInstalls the Cypress binary that matches the version of the `cypress` npm package into the [global cache](/llm/markdown/app/references/advanced-installation.md#Binary-cache).\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nnpx cypress install\n```\n\n```\nyarn cypress install\n```\n\n```\npnpm cypress install\n```\n\n```\nbunx cypress install\n```\n\nThis command normally runs automatically as a `postinstall` step when you add `cypress` with your package manager, so you rarely need to run it yourself. Running it explicitly is useful when the binary was not downloaded during `npm install`, including these scenarios:\n\n*   Your package manager blocks lifecycle scripts (for example with `--ignore-scripts`, or because a security policy disallows `postinstall`), so you install the binary yourself at a later stage instead of granting Cypress install-time script access.\n*   You want to download and cache the binary on one machine (such as a CI \"install\" stage), then skip the download on every subsequent machine that reuses that [cache](/llm/markdown/app/references/advanced-installation.md#Binary-cache).\n*   The automatic install was skipped on purpose by setting `CYPRESS_INSTALL_BINARY=0`.\n*   You want to [troubleshoot the installation](/llm/markdown/app/references/advanced-installation.md#Troubleshoot-installation) by running the download on its own with [debug logging](/llm/markdown/app/references/troubleshooting.md#Print-DEBUG-logs) enabled.\n\nFor example, add `cypress` while skipping the binary download, then run the install on its own with debug logging enabled:\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nCYPRESS_INSTALL_BINARY=0 npm install cypress --save-dev\n```\n\n```\nCYPRESS_INSTALL_BINARY=0 yarn add cypress --dev\n```\n\n```\nCYPRESS_INSTALL_BINARY=0 pnpm add --save-dev cypress\n```\n\n```\nCYPRESS_INSTALL_BINARY=0 bun add --dev cypress\n```\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nDEBUG=cypress:cli* npx cypress install\n```\n\n```\nDEBUG=cypress:cli* yarn cypress install\n```\n\n```\nDEBUG=cypress:cli* pnpm cypress install\n```\n\n```\nDEBUG=cypress:cli* bunx cypress install\n```\n\nThe binary that gets installed, the cache location, and the download source can be customized through environment variables. See [Advanced Installation](/llm/markdown/app/references/advanced-installation.md) for details.\n\n#### Options\n\n| Option | Description |\n| --- | --- |\n| `--force`, `-f` | [Force install the Cypress binary](#cypress-install-force) |\n| `--help`, `-h` | Output usage information |\n\n#### `cypress install --force`\n\nBy default, `cypress install` does nothing when a binary matching the package version is already present in the [cache](/llm/markdown/app/references/advanced-installation.md#Binary-cache). Pass `--force` to download and reinstall the binary anyway, overwriting any existing installation.\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nnpx cypress install --force\n```\n\n```\nyarn cypress install --force\n```\n\n```\npnpm cypress install --force\n```\n\n```\nbunx cypress install --force\n```\n\n### `cypress verify`\n\nVerify that Cypress is installed correctly and is executable.\n\n```\ncypress verify✔  Verified Cypress! /Users/jane/Library/Caches/Cypress/3.0.0/Cypress.app\n```\n\nTo change the default timeout of 30 seconds, you can set the environment variable `CYPRESS_VERIFY_TIMEOUT`:\n\n```\nexport CYPRESS_VERIFY_TIMEOUT=60000 # wait for 60 secondscypress verify\n```\n\nNote that the `cypress verify` command is executed as part of the `cypress open` and `cypress run` commands. The `CYPRESS_VERIFY_TIMEOUT` environment variable should be provided for those commands if you wish to modify the timeout duration.\n\nYou can disable verification by setting the `CYPRESS_SKIP_VERIFY` environment variable to `true`.\n\n### `cypress version`\n\nPrints the installed Cypress binary version, the Cypress package version, the version of Electron used to build Cypress, and the bundled Node version.\n\nIn most cases the binary and the package versions will be the same, but they could be different if you have installed a different version of the package and for some reason failed to install the matching binary version.\n\n```\ncypress versionCypress package version: 12.0.0Cypress binary version: 12.0.0Electron version: 21.0.0Bundled Node version: 16.16.0\n```\n\nYou can print each individual component's version number also.\n\n```\ncypress version --component package12.0.0cypress version --component binary12.0.0cypress version --component electron21.0.0cypress version --component node16.16.0\n```\n\n### `cypress cache [command]`\n\nCommands for managing the global Cypress cache. The Cypress cache applies to all installs of Cypress across your machine, global or not.\n\n#### `cypress cache path`\n\nPrint the `path` to the Cypress cache folder. You can change the path where the Cypress cache is located by following [these instructions](/llm/markdown/app/references/advanced-installation.md#Binary-cache).\n\n```\ncypress cache path/Users/jane/Library/Caches/Cypress\n```\n\n#### `cypress cache list`\n\nPrint all existing installed versions of Cypress. The output will be a table with cached versions and the last time the binary was used by the user, determined from the file's access time.\n\n```\ncypress cache list┌─────────┬──────────────┐│ version │ last used    │├─────────┼──────────────┤│ 3.0.0   │ 3 months ago │├─────────┼──────────────┤│ 3.0.1   │ 5 days ago   │└─────────┴──────────────┘\n```\n\nYou can calculate the size of every Cypress version folder by adding the `--size` argument to the command. Note that calculating the disk size can be slow.\n\n```\ncypress cache list --size┌─────────┬──────────────┬─────────┐│ version │ last used    │ size    │├─────────┼──────────────┼─────────┤│ 5.0.0   │ 3 months ago │ 425.3MB │├─────────┼──────────────┼─────────┤│ 5.3.0   │ 5 days ago   │ 436.3MB │└─────────┴──────────────┴─────────┘\n```\n\n#### `cypress cache clear`\n\nClear the contents of the Cypress cache. This is useful when you want Cypress to clear out all installed versions of Cypress that may be cached on your machine. After running this command, you will need to run `cypress install` before running Cypress again.\n\n```\ncypress cache clear\n```\n\n#### `cypress cache prune`\n\nDeletes all installed Cypress versions from the cache except for the currently-installed version.\n\n```\ncypress cache prune\n```\n",
      "section": "app",
      "anchors": [
        "commands"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 5192
    },
    {
      "id": "app/references/command-line#cypress-run",
      "doc_id": "app/references/command-line",
      "heading": "cypress run",
      "heading_level": 3,
      "content_markdown": "### `cypress run`\n\nRuns Cypress tests to completion. By default, `cypress run` will run all tests headlessly.\n\n```\ncypress run [options]\n```\n\n#### Options\n\n| Option | Description |\n| --- | --- |\n| `--auto-cancel-after-failures` | [Overrides the Cloud project-level configuration to set the failed test threshold for auto cancellation or to disable auto cancellation when recording to the Cloud](#auto-cancel-after-runs) |\n| `--browser`, `-b` | [Run Cypress in the browser with the given name. If a filesystem path is supplied, Cypress will attempt to use the browser at that path.](#cypress-run-browser-lt-browser-name-or-path-gt) |\n| `--ci-build-id` | [Specify a unique identifier for a run to enable grouping or parallelization.](#cypress-run-ci-build-id-lt-id-gt) |\n| `--component` | [Run component tests](/llm/markdown/app/core-concepts/testing-types.md#What-is-Component-Testing) |\n| `--config`, `-c` | [Specify configuration](#cypress-run-config-lt-config-gt) |\n| `--config-file`, `-C` | [Specify configuration file](#cypress-run-config-file-lt-configuration-file-gt) |\n| `--e2e` | Run end to end tests (default) |\n| `--env`, `-e` | [Specify secret environment variables](#cypress-run-env-lt-env-gt) |\n| `--expose`, `-x` | [Specify public configuration values](#cypress-run-expose-lt-expose-gt) |\n| `--group` | [Group recorded tests together under a single run](#cypress-run-group-lt-name-gt) |\n| `--headed` | [Displays the browser instead of running headlessly](#cypress-run-headed) |\n| `--headless` | Hide the browser instead of running headed (default during `cypress run`) |\n| `--help`, `-h` | Output usage information |\n| `--key`, `-k` | [Specify your secret record key](#cypress-run-record-key-lt-record-key-gt) |\n| `--no-exit` | [Keep Cypress open after tests in a spec file run](#cypress-run-no-exit) |\n| `--no-runner-ui` | [Hides the Cypress Runner UI](#cypress-run-no-runner-ui) |\n| `--parallel` | [Run recorded specs in parallel across multiple machines](#cypress-run-parallel) |\n| `--pass-with-no-tests` | [Exits with success when no spec files are found](#cypress-run-pass-with-no-tests) |\n| `--port`,`-p` | [Override default port](#cypress-run-port-lt-port-gt) |\n| `--posix-exit-codes` | [Exit with a POSIX-compliant exit code](#cypress-run-posix-exit-codes) rather than the number of failed tests. |\n| `--project`, `-P` | [Path to a specific project](#cypress-run-project-lt-project-path-gt) |\n| `--quiet`, `-q` | [Reduce output to `stdout`](#cypress-run-quiet) |\n| `--record` | [Whether to record the test run](#cypress-run-record-key-lt-record-key-gt) |\n| `--reporter`, `-r` | [Specify a Mocha reporter](#cypress-run-reporter-lt-reporter-gt) |\n| `--reporter-options`, `-o` | [Specify Mocha reporter options](#cypress-run-reporter-lt-reporter-gt) |\n| `--runner-ui` | [Displays the Cypress Runner UI. Useful for when Test Replay is enabled and you would still like the Cypress Runner UI to be displayed for screenshots and video](#cypress-run-runner-ui) |\n| `--spec`, `-s` | [Specify the spec files to run](#cypress-run-spec-lt-spec-gt) |\n| `--tag`, `-t` | [Identify a run with a tag or tags](#cypress-run-tag-lt-tag-gt) |\n\n#### `cypress run --auto-cancel-after-failures <autoCancelAfterFailures>`\n\nThe \"autoCancelAfterFailures\" argument is the number of times tests can fail before the run is canceled\n\n```\ncypress run --record --key <<your_record_key>> --auto-cancel-after-failures 1\n```\n\nYou can also specify `false` for the value to disable Auto Cancellation for the run:\n\n```\ncypress run --record --key <<your_record_key>> --auto-cancel-after-failures false\n```\n\n#### `cypress run --browser <browser-name-or-path>`\n\n```\ncypress run --browser chrome\n```\n\nThe \"browser\" argument can be set to `chrome`, `chromium`, `edge`, `electron`, `firefox` to launch a browser detected on your system. Cypress will attempt to automatically find the installed browser for you.\n\nTo launch non-stable browsers, add a colon and the desired release channel. For example, to launch Chrome Canary, use `chrome:canary`.\n\nYou can also choose a browser by supplying a path:\n\n```\ncypress run --browser /usr/bin/chromium\n```\n\n[Having trouble with browser detection? Check out our troubleshooting guide](/llm/markdown/app/references/troubleshooting.md#Launching-browsers)\n\n#### `cypress run --ci-build-id <id>`\n\nThis value should be automatically detected for most CI providers and is unnecessary to define unless Cypress is unable to determine it.\n\nTypically, this is defined as a system environment variable within your CI provider, defining a unique \"build\" or \"run\".\n\n```\ncypress run --ci-build-id BUILD_NUMBER\n```\n\nOnly valid when providing a `--group` or `--parallel` flag. Read our [parallelization](/llm/markdown/cloud/features/smart-orchestration/parallelization.md) documentation to learn more.\n\n#### `cypress run --config <config>`\n\nSet [configuration](/llm/markdown/app/references/configuration.md) values. Separate multiple values with commas. The values set here override any values set in your configuration file.\n\n```\ncypress run --config pageLoadTimeout=100000,watchForFileChanges=false\n```\n\nFor more complex configuration objects, you may want to consider passing a [JSON.stringified](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) object surrounded by single quotes.\n\nHere, we're passing in the configuration for component spec files.\n\n```\ncypress run --config '{\"watchForFileChanges\":false,\"specPattern\":[\"**/*.cy.js\",\"**/*.cy.ts\"]}'\n```\n\n##### Real World Example\n\nThe Cypress [Real World App (RWA)](https://github.com/cypress-io/cypress-realworld-app) uses `--config` flag to easily specify [viewport](/llm/markdown/app/references/configuration.md#Viewport) sizes for responsive testing locally and in dedicated CI jobs.\n\nExamples:\n\n*   [npm scripts](https://github.com/cypress-io/cypress-realworld-app/blob/07a6483dfe7ee44823380832b0b23a4dacd72504/package.json#L120) to run Cypress in mobile viewport.\n\n*   [Circle CI job configuration](https://github.com/cypress-io/cypress-realworld-app/blob/07a6483dfe7ee44823380832b0b23a4dacd72504/.circleci/config.yml#L82-L100) for running test suites in mobile viewport.\n\n#### `cypress run --config-file <configuration-file>`\n\nYou can specify a path to a file where [Cypress configuration](/llm/markdown/app/references/configuration.md) values are set.\n\n```\ncypress run --config-file tests/cypress.config.js\n```\n\n#### `cypress run --env <env>`\n\n**Security Warning**\n\nSecrets passed via CLI may appear in CI logs. For production use, prefer setting secrets via your CI/CD platform's secret management system.\n\nSet secret [environment variables](/llm/markdown/app/guides/environment-variables.md) for use in your tests via [`cy.env()`](/llm/markdown/api/commands/env.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress run --env apiKey=secret-key-12345\n```\n\nPass several variables using commas and no spaces. Numbers are automatically converted from strings.\n\n```\ncypress run --env apiKey=secret-key-12345,apiUrl=https://api.example.com\n```\n\nPass an object as a JSON in a string.\n\n```\ncypress run --env credentials='{\"apiKey\":\"secret-key-12345\",\"dbPassword\":\"secure-password\"}'\n```\n\n#### `cypress run --expose <expose>`\n\nSet public configuration values for use in your tests via [`Cypress.expose()`](/llm/markdown/api/cypress-api/expose.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress run --expose apiVersion=v2,featureFlag=true\n```\n\n#### `cypress run --group <name>`\n\nGroup recorded tests together under a single run.\n\n```\ncypress run --group develop-env\n```\n\nYou can add multiple groups to the same run by passing a different name. This can help distinguish groups of specs from each other.\n\n```\ncypress run --group admin-tests --spec 'cypress/e2e/admin/**/*'\n```\n\n```\ncypress run --group user-tests --spec 'cypress/e2e/user/**/*'\n```\n\nSpecifying the `--ci-build-id` may also be necessary.\n\n[Read more about grouping.](/llm/markdown/cloud/features/smart-orchestration/parallelization.md#Grouping-test-runs)\n\n#### `cypress run --headed`\n\nBy default, Cypress will run tests headlessly during `cypress run`.\n\nPassing `--headed` will force the browser to be shown. This matches how you run any browser via `cypress open`.\n\n```\ncypress run --headed\n```\n\n#### `cypress run --no-exit`\n\nTo prevent Cypress from exiting after running tests in a spec file, use `--no-exit`.\n\nYou can pass `--headed --no-exit` in order to view the **command log** or have access to **developer tools** after a `spec` has run.\n\n```\ncypress run --headed --no-exit\n```\n\n#### `cypress run --no-runner-ui`\n\nTo prevent Cypress from rendering the Runner UI, use `--no-runner-ui`.\n\n```\ncypress run --no-runner-ui\n```\n\n#### `cypress run --parallel`\n\nRun recorded specs in [parallel](/llm/markdown/cloud/features/smart-orchestration/parallelization.md) across multiple machines.\n\n```\ncypress run --record --parallel\n```\n\nYou can additionally pass a `--group` flag so this shows up as a named [group](/llm/markdown/cloud/features/smart-orchestration/parallelization.md#Grouping-test-runs).\n\n```\ncypress run --record --parallel --group e2e-staging-specs\n```\n\nRead our [parallelization](/llm/markdown/cloud/features/smart-orchestration/parallelization.md) documentation to learn more.\n\n#### `cypress run --pass-with-no-tests`\n\nExits with a success code when no spec files are found. Useful in CI pipelines where specs may be conditionally generated or filtered out at runtime.\n\n```\ncypress run --pass-with-no-tests\n```\n\n#### `cypress run --port <port>`\n\n```\ncypress run --port 8080\n```\n\n#### `cypress run --posix-exit-codes`\n\nThis changes the default behavior of Cypress regarding exit codes. This flag causes Cypress to exit with POSIX exit code of 1 when there are test failures or if Cypress could not run, rather than the number of tests that failed. It can return additional POSIX-compliant exit codes for other scenarios as well. See the [Exit Code section](/llm/markdown/app/references/command-line.md#Exit-code) for a comprehensive reference of Cypress exit codes.\n\n```\ncypress run --posix-exit-codes\n```\n\n#### `cypress run --project <project-path>`\n\nBy default, Cypress expects your `cypress.config.js` (or `cypress.config.ts`) to be found in the current working directory. Use `--project` to point Cypress at a different directory. This is useful when you have multiple Cypress projects in one repository and want to run a specific one without changing your working directory.\n\n```\ncypress run --project ./some/nested/folder\n```\n\n#### `cypress run --quiet`\n\nTo reduce the output from Cypress printed to `stdout`, use `--quiet`.\n\n```\ncypress run --quiet\n```\n\nIf passed, Cypress will only print output to `stdout` from the [built-in](/llm/markdown/app/tooling/reporters.md#Built-in-reporters) default [Mocha spec reporter](https://mochajs.org/#spec), or from any other configured [Mocha reporter](/llm/markdown/app/tooling/reporters.md).\n\n#### `cypress run --record --key <record-key>`\n\nRecord your test results to [Cypress Cloud](/llm/markdown/cloud/get-started/introduction.md). For this option to work you must first [set up your project to record](/llm/markdown/cloud/get-started/setup.md#Setup), make sure your `projectId` is set in your [Cypress configuration file](/llm/markdown/app/references/configuration.md#Configuration-File), and append your **Record Key** to the command.\n\n```\ncypress run --record --key <record_key>\n```\n\nIf you set the **Record Key** as the environment variable `CYPRESS_RECORD_KEY`, you can omit the `--key` flag. You may want to set this environment variable when running in [Continuous Integration](/llm/markdown/app/continuous-integration/overview.md).\n\n```\nexport CYPRESS_RECORD_KEY=abc-key-123\n```\n\nNow you can omit the `--key` flag.\n\n```\ncypress run --record\n```\n\n`CYPRESS_RECORD_KEY` must be set as an actual operating system environment variable (for example via `export CYPRESS_RECORD_KEY=...` or your CI provider's secrets). Cypress reads it directly from your shell or CI environment — it is **not** read from `cypress.env.json` or the `env` block of your Cypress configuration, since those only populate test environment variables. If you don't want to set an environment variable, pass the key inline with the `--key` flag instead.\n\nFor more information on recording runs, see the [Cypress Cloud setup instructions](/llm/markdown/cloud/get-started/setup.md#Setup). For an in-depth explanation of how Cypress uses your record key and `projectId` to save your test results to Cypress Cloud, see the [Identification section](/llm/markdown/cloud/account-management/projects.md#Identification).\n\n#### `cypress run --reporter <reporter>`\n\nYou can tests specifying a specific [Mocha reporter](/llm/markdown/app/tooling/reporters.md).\n\n```\ncypress run --reporter json\n```\n\nYou can specify reporter options using the `--reporter-options <reporter-options>` flag.\n\n```\ncypress run --reporter junit --reporter-options mochaFile=result.xml,toConsole=true\n```\n\n#### `cypress run --runner-ui`\n\nTo force Cypress to render the Runner UI, use `--runner-ui`.\n\n```\ncypress run --runner-ui\n```\n\nUseful for when [Test Replay](/llm/markdown/cloud/features/test-replay.md) is enabled and you would still like the Runner UI to be rendered for screenshots and video.\n\n#### `cypress run --spec <spec>`\n\nRun tests specifying a single test file to run instead of all tests. The spec path should be an absolute path or can be relative to the current working directory.\n\n`--spec` only runs specs that **also match the configured [`specPattern`](/llm/markdown/app/references/configuration.md#e2e)**. Specs located outside the configured `specPattern` will not be found. See [Test files not found when using `spec` parameter](/llm/markdown/app/references/configuration.md#Test-files-not-found-when-using-spec-parameter) for details.\n\n```\ncypress run --spec \"cypress/e2e/examples/actions.cy.js\"\n```\n\nRun tests within the folder matching the glob _(Note: Using double quotes is strongly recommended)_.\n\n```\ncypress run --spec \"cypress/e2e/login/**/*\"\n```\n\nRun tests specifying multiple test files to run.\n\n```\ncypress run --spec \"cypress/e2e/examples/actions.cy.js,cypress/e2e/examples/files.cy.js\"\n```\n\nUse in combination with `--project` parameter. Imagine the Cypress tests are in a subfolder `tests/e2e` of the current project:\n\n```\napp/  node_modules/  package.json  tests/    unit/    e2e/      cypress/        e2e/          spec.cy.js      cypress.config.js\n```\n\nIf we are in the `app` folder, we can run the specs using the following command\n\n```\ncypress run --project tests/e2e --spec ./tests/e2e/cypress/e2e/spec.cy.js\n```\n\n#### `cypress run --tag <tag>`\n\nAdd a tag or tags to the recorded run. This can be used to help identify separate runs when displayed in Cypress Cloud.\n\n```\ncypress run  --record --tag \"staging\"\n```\n\nGive a run multiple tags.\n\n```\ncypress run --record --tag \"production,nightly\"\n```\n\nCypress Cloud will display any tags sent with the appropriate run.\n\nTags are also useful for surfacing environment details that Cypress Cloud does not record on its own, such as the Node.js version a run used. By tagging runs with these values you can easily differentiate runs that were executed against different versions in the same matrix. For example, when testing across multiple Node.js versions in CI you can include the version in the tags:\n\n```\ncypress run --record --tag \"node-${nodeVersion}\"\n```\n\nThis makes runs that use the same spec set but a different Node.js version (or any other build/environment detail Cypress Cloud does not capture) easy to tell apart in Cypress Cloud.\n\n**App Quality Profiles**: If you use Cypress Cloud's [accessibility](/llm/markdown/accessibility/get-started/introduction.md) and [UI Coverage reporting](/llm/markdown/accessibility/get-started/introduction.md), a run tag can be mapped to [App Quality Profiles](/llm/markdown/accessibility/configuration/profiles.md) to automatically apply different configuration settings for different types of runs.\n\n#### Exit code\n\nCypress supports two different exit code behaviors. The default behavior is similar to that of Mocha, but is not POSIX compliant: reserved exit codes can be returned for certain conditions. As well, the default behavior can return a false negative when there are a number of tests that fail in multiples of 256: most terminals will apply modulo 256 to any exit code larger than 255.\n\nPOSIX compliant exit codes are available via the `--posix-exit-codes` flag. When this flag is passed, additional conditions can be returned that are not possible with the default behavior, including when Cypress fails due to network errors when connections to Cypress Cloud are required, such as in `--record` or `--parallel` runs.\n\nWhen using POSIX compliant exit codes, the number of failed tests can be determined from the [Module API](/llm/markdown/app/references/module-api.md) or [structured reporter data](/llm/markdown/app/tooling/reporters.md).\n\n| Exit Condition | POSIX Exit Code (with `--posix-exit-codes`) | Default Exit Code (without `--posix-exit-codes`) |\n| --- | --- | --- |\n| All tests pass | 0 | 0 |\n| _n_ tests fail | 1 | _n_ |\n| Cypress could not run due to a network error when connections to Cypress Cloud are required | 112 | 1 |\n| Cypress could not run for any other reason, including no spec files found | 1 | 1 |\n",
      "section": "app",
      "anchors": [
        "cypress-run"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 2895
    },
    {
      "id": "app/references/command-line#options",
      "doc_id": "app/references/command-line",
      "heading": "Options",
      "heading_level": 4,
      "content_markdown": "#### Options\n\n| Option | Description |\n| --- | --- |\n| `--auto-cancel-after-failures` | [Overrides the Cloud project-level configuration to set the failed test threshold for auto cancellation or to disable auto cancellation when recording to the Cloud](#auto-cancel-after-runs) |\n| `--browser`, `-b` | [Run Cypress in the browser with the given name. If a filesystem path is supplied, Cypress will attempt to use the browser at that path.](#cypress-run-browser-lt-browser-name-or-path-gt) |\n| `--ci-build-id` | [Specify a unique identifier for a run to enable grouping or parallelization.](#cypress-run-ci-build-id-lt-id-gt) |\n| `--component` | [Run component tests](/llm/markdown/app/core-concepts/testing-types.md#What-is-Component-Testing) |\n| `--config`, `-c` | [Specify configuration](#cypress-run-config-lt-config-gt) |\n| `--config-file`, `-C` | [Specify configuration file](#cypress-run-config-file-lt-configuration-file-gt) |\n| `--e2e` | Run end to end tests (default) |\n| `--env`, `-e` | [Specify secret environment variables](#cypress-run-env-lt-env-gt) |\n| `--expose`, `-x` | [Specify public configuration values](#cypress-run-expose-lt-expose-gt) |\n| `--group` | [Group recorded tests together under a single run](#cypress-run-group-lt-name-gt) |\n| `--headed` | [Displays the browser instead of running headlessly](#cypress-run-headed) |\n| `--headless` | Hide the browser instead of running headed (default during `cypress run`) |\n| `--help`, `-h` | Output usage information |\n| `--key`, `-k` | [Specify your secret record key](#cypress-run-record-key-lt-record-key-gt) |\n| `--no-exit` | [Keep Cypress open after tests in a spec file run](#cypress-run-no-exit) |\n| `--no-runner-ui` | [Hides the Cypress Runner UI](#cypress-run-no-runner-ui) |\n| `--parallel` | [Run recorded specs in parallel across multiple machines](#cypress-run-parallel) |\n| `--pass-with-no-tests` | [Exits with success when no spec files are found](#cypress-run-pass-with-no-tests) |\n| `--port`,`-p` | [Override default port](#cypress-run-port-lt-port-gt) |\n| `--posix-exit-codes` | [Exit with a POSIX-compliant exit code](#cypress-run-posix-exit-codes) rather than the number of failed tests. |\n| `--project`, `-P` | [Path to a specific project](#cypress-run-project-lt-project-path-gt) |\n| `--quiet`, `-q` | [Reduce output to `stdout`](#cypress-run-quiet) |\n| `--record` | [Whether to record the test run](#cypress-run-record-key-lt-record-key-gt) |\n| `--reporter`, `-r` | [Specify a Mocha reporter](#cypress-run-reporter-lt-reporter-gt) |\n| `--reporter-options`, `-o` | [Specify Mocha reporter options](#cypress-run-reporter-lt-reporter-gt) |\n| `--runner-ui` | [Displays the Cypress Runner UI. Useful for when Test Replay is enabled and you would still like the Cypress Runner UI to be displayed for screenshots and video](#cypress-run-runner-ui) |\n| `--spec`, `-s` | [Specify the spec files to run](#cypress-run-spec-lt-spec-gt) |\n| `--tag`, `-t` | [Identify a run with a tag or tags](#cypress-run-tag-lt-tag-gt) |\n",
      "section": "app",
      "anchors": [
        "options"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 489
    },
    {
      "id": "app/references/command-line#cypress-run-auto-cancel-after-failures-autocancelafterfailures",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --auto-cancel-after-failures <autoCancelAfterFailures>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --auto-cancel-after-failures <autoCancelAfterFailures>`\n\nThe \"autoCancelAfterFailures\" argument is the number of times tests can fail before the run is canceled\n\n```\ncypress run --record --key <<your_record_key>> --auto-cancel-after-failures 1\n```\n\nYou can also specify `false` for the value to disable Auto Cancellation for the run:\n\n```\ncypress run --record --key <<your_record_key>> --auto-cancel-after-failures false\n```\n",
      "section": "app",
      "anchors": [
        "cypress-run-auto-cancel-after-failures-autocancelafterfailures"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 72
    },
    {
      "id": "app/references/command-line#cypress-run-browser-browser-name-or-path",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --browser <browser-name-or-path>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --browser <browser-name-or-path>`\n\n```\ncypress run --browser chrome\n```\n\nThe \"browser\" argument can be set to `chrome`, `chromium`, `edge`, `electron`, `firefox` to launch a browser detected on your system. Cypress will attempt to automatically find the installed browser for you.\n\nTo launch non-stable browsers, add a colon and the desired release channel. For example, to launch Chrome Canary, use `chrome:canary`.\n\nYou can also choose a browser by supplying a path:\n\n```\ncypress run --browser /usr/bin/chromium\n```\n\n[Having trouble with browser detection? Check out our troubleshooting guide](/llm/markdown/app/references/troubleshooting.md#Launching-browsers)\n",
      "section": "app",
      "anchors": [
        "cypress-run-browser-browser-name-or-path"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 117
    },
    {
      "id": "app/references/command-line#cypress-run-ci-build-id-id",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --ci-build-id <id>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --ci-build-id <id>`\n\nThis value should be automatically detected for most CI providers and is unnecessary to define unless Cypress is unable to determine it.\n\nTypically, this is defined as a system environment variable within your CI provider, defining a unique \"build\" or \"run\".\n\n```\ncypress run --ci-build-id BUILD_NUMBER\n```\n\nOnly valid when providing a `--group` or `--parallel` flag. Read our [parallelization](/llm/markdown/cloud/features/smart-orchestration/parallelization.md) documentation to learn more.\n",
      "section": "app",
      "anchors": [
        "cypress-run-ci-build-id-id"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 91
    },
    {
      "id": "app/references/command-line#cypress-run-config-config",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --config <config>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --config <config>`\n\nSet [configuration](/llm/markdown/app/references/configuration.md) values. Separate multiple values with commas. The values set here override any values set in your configuration file.\n\n```\ncypress run --config pageLoadTimeout=100000,watchForFileChanges=false\n```\n\nFor more complex configuration objects, you may want to consider passing a [JSON.stringified](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) object surrounded by single quotes.\n\nHere, we're passing in the configuration for component spec files.\n\n```\ncypress run --config '{\"watchForFileChanges\":false,\"specPattern\":[\"**/*.cy.js\",\"**/*.cy.ts\"]}'\n```\n\n##### Real World Example\n\nThe Cypress [Real World App (RWA)](https://github.com/cypress-io/cypress-realworld-app) uses `--config` flag to easily specify [viewport](/llm/markdown/app/references/configuration.md#Viewport) sizes for responsive testing locally and in dedicated CI jobs.\n\nExamples:\n\n*   [npm scripts](https://github.com/cypress-io/cypress-realworld-app/blob/07a6483dfe7ee44823380832b0b23a4dacd72504/package.json#L120) to run Cypress in mobile viewport.\n\n*   [Circle CI job configuration](https://github.com/cypress-io/cypress-realworld-app/blob/07a6483dfe7ee44823380832b0b23a4dacd72504/.circleci/config.yml#L82-L100) for running test suites in mobile viewport.\n",
      "section": "app",
      "anchors": [
        "cypress-run-config-config"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 152
    },
    {
      "id": "app/references/command-line#real-world-example",
      "doc_id": "app/references/command-line",
      "heading": "Real World Example",
      "heading_level": 5,
      "content_markdown": "##### Real World Example\n\nThe Cypress [Real World App (RWA)](https://github.com/cypress-io/cypress-realworld-app) uses `--config` flag to easily specify [viewport](/llm/markdown/app/references/configuration.md#Viewport) sizes for responsive testing locally and in dedicated CI jobs.\n\nExamples:\n\n*   [npm scripts](https://github.com/cypress-io/cypress-realworld-app/blob/07a6483dfe7ee44823380832b0b23a4dacd72504/package.json#L120) to run Cypress in mobile viewport.\n\n*   [Circle CI job configuration](https://github.com/cypress-io/cypress-realworld-app/blob/07a6483dfe7ee44823380832b0b23a4dacd72504/.circleci/config.yml#L82-L100) for running test suites in mobile viewport.\n",
      "section": "app",
      "anchors": [
        "real-world-example"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 65
    },
    {
      "id": "app/references/command-line#cypress-run-env-env",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --env <env>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --env <env>`\n\n**Security Warning**\n\nSecrets passed via CLI may appear in CI logs. For production use, prefer setting secrets via your CI/CD platform's secret management system.\n\nSet secret [environment variables](/llm/markdown/app/guides/environment-variables.md) for use in your tests via [`cy.env()`](/llm/markdown/api/commands/env.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress run --env apiKey=secret-key-12345\n```\n\nPass several variables using commas and no spaces. Numbers are automatically converted from strings.\n\n```\ncypress run --env apiKey=secret-key-12345,apiUrl=https://api.example.com\n```\n\nPass an object as a JSON in a string.\n\n```\ncypress run --env credentials='{\"apiKey\":\"secret-key-12345\",\"dbPassword\":\"secure-password\"}'\n```\n",
      "section": "app",
      "anchors": [
        "cypress-run-env-env"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 121
    },
    {
      "id": "app/references/command-line#cypress-run-expose-expose",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --expose <expose>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --expose <expose>`\n\nSet public configuration values for use in your tests via [`Cypress.expose()`](/llm/markdown/api/cypress-api/expose.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress run --expose apiVersion=v2,featureFlag=true\n```\n",
      "section": "app",
      "anchors": [
        "cypress-run-expose-expose"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 43
    },
    {
      "id": "app/references/command-line#cypress-run-group-name",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --group <name>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --group <name>`\n\nGroup recorded tests together under a single run.\n\n```\ncypress run --group develop-env\n```\n\nYou can add multiple groups to the same run by passing a different name. This can help distinguish groups of specs from each other.\n\n```\ncypress run --group admin-tests --spec 'cypress/e2e/admin/**/*'\n```\n\n```\ncypress run --group user-tests --spec 'cypress/e2e/user/**/*'\n```\n\nSpecifying the `--ci-build-id` may also be necessary.\n\n[Read more about grouping.](/llm/markdown/cloud/features/smart-orchestration/parallelization.md#Grouping-test-runs)\n",
      "section": "app",
      "anchors": [
        "cypress-run-group-name"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 93
    },
    {
      "id": "app/references/command-line#cypress-run-headed",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --headed",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --headed`\n\nBy default, Cypress will run tests headlessly during `cypress run`.\n\nPassing `--headed` will force the browser to be shown. This matches how you run any browser via `cypress open`.\n\n```\ncypress run --headed\n```\n",
      "section": "app",
      "anchors": [
        "cypress-run-headed"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 51
    },
    {
      "id": "app/references/command-line#cypress-run-no-exit",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --no-exit",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --no-exit`\n\nTo prevent Cypress from exiting after running tests in a spec file, use `--no-exit`.\n\nYou can pass `--headed --no-exit` in order to view the **command log** or have access to **developer tools** after a `spec` has run.\n\n```\ncypress run --headed --no-exit\n```\n",
      "section": "app",
      "anchors": [
        "cypress-run-no-exit"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 63
    },
    {
      "id": "app/references/command-line#cypress-run-parallel",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --parallel",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --parallel`\n\nRun recorded specs in [parallel](/llm/markdown/cloud/features/smart-orchestration/parallelization.md) across multiple machines.\n\n```\ncypress run --record --parallel\n```\n\nYou can additionally pass a `--group` flag so this shows up as a named [group](/llm/markdown/cloud/features/smart-orchestration/parallelization.md#Grouping-test-runs).\n\n```\ncypress run --record --parallel --group e2e-staging-specs\n```\n\nRead our [parallelization](/llm/markdown/cloud/features/smart-orchestration/parallelization.md) documentation to learn more.\n",
      "section": "app",
      "anchors": [
        "cypress-run-parallel"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 64
    },
    {
      "id": "app/references/command-line#cypress-run-pass-with-no-tests",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --pass-with-no-tests",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --pass-with-no-tests`\n\nExits with a success code when no spec files are found. Useful in CI pipelines where specs may be conditionally generated or filtered out at runtime.\n\n```\ncypress run --pass-with-no-tests\n```\n",
      "section": "app",
      "anchors": [
        "cypress-run-pass-with-no-tests"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 47
    },
    {
      "id": "app/references/command-line#cypress-run-posix-exit-codes",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --posix-exit-codes",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --posix-exit-codes`\n\nThis changes the default behavior of Cypress regarding exit codes. This flag causes Cypress to exit with POSIX exit code of 1 when there are test failures or if Cypress could not run, rather than the number of tests that failed. It can return additional POSIX-compliant exit codes for other scenarios as well. See the [Exit Code section](/llm/markdown/app/references/command-line.md#Exit-code) for a comprehensive reference of Cypress exit codes.\n\n```\ncypress run --posix-exit-codes\n```\n",
      "section": "app",
      "anchors": [
        "cypress-run-posix-exit-codes"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 100
    },
    {
      "id": "app/references/command-line#cypress-run-project-project-path",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --project <project-path>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --project <project-path>`\n\nBy default, Cypress expects your `cypress.config.js` (or `cypress.config.ts`) to be found in the current working directory. Use `--project` to point Cypress at a different directory. This is useful when you have multiple Cypress projects in one repository and want to run a specific one without changing your working directory.\n\n```\ncypress run --project ./some/nested/folder\n```\n",
      "section": "app",
      "anchors": [
        "cypress-run-project-project-path"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 80
    },
    {
      "id": "app/references/command-line#cypress-run-quiet",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --quiet",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --quiet`\n\nTo reduce the output from Cypress printed to `stdout`, use `--quiet`.\n\n```\ncypress run --quiet\n```\n\nIf passed, Cypress will only print output to `stdout` from the [built-in](/llm/markdown/app/tooling/reporters.md#Built-in-reporters) default [Mocha spec reporter](https://mochajs.org/#spec), or from any other configured [Mocha reporter](/llm/markdown/app/tooling/reporters.md).\n",
      "section": "app",
      "anchors": [
        "cypress-run-quiet"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 57
    },
    {
      "id": "app/references/command-line#cypress-run-record-key-record-key",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --record --key <record-key>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --record --key <record-key>`\n\nRecord your test results to [Cypress Cloud](/llm/markdown/cloud/get-started/introduction.md). For this option to work you must first [set up your project to record](/llm/markdown/cloud/get-started/setup.md#Setup), make sure your `projectId` is set in your [Cypress configuration file](/llm/markdown/app/references/configuration.md#Configuration-File), and append your **Record Key** to the command.\n\n```\ncypress run --record --key <record_key>\n```\n\nIf you set the **Record Key** as the environment variable `CYPRESS_RECORD_KEY`, you can omit the `--key` flag. You may want to set this environment variable when running in [Continuous Integration](/llm/markdown/app/continuous-integration/overview.md).\n\n```\nexport CYPRESS_RECORD_KEY=abc-key-123\n```\n\nNow you can omit the `--key` flag.\n\n```\ncypress run --record\n```\n\n`CYPRESS_RECORD_KEY` must be set as an actual operating system environment variable (for example via `export CYPRESS_RECORD_KEY=...` or your CI provider's secrets). Cypress reads it directly from your shell or CI environment — it is **not** read from `cypress.env.json` or the `env` block of your Cypress configuration, since those only populate test environment variables. If you don't want to set an environment variable, pass the key inline with the `--key` flag instead.\n\nFor more information on recording runs, see the [Cypress Cloud setup instructions](/llm/markdown/cloud/get-started/setup.md#Setup). For an in-depth explanation of how Cypress uses your record key and `projectId` to save your test results to Cypress Cloud, see the [Identification section](/llm/markdown/cloud/account-management/projects.md#Identification).\n",
      "section": "app",
      "anchors": [
        "cypress-run-record-key-record-key"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 276
    },
    {
      "id": "app/references/command-line#cypress-run-reporter-reporter",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --reporter <reporter>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --reporter <reporter>`\n\nYou can tests specifying a specific [Mocha reporter](/llm/markdown/app/tooling/reporters.md).\n\n```\ncypress run --reporter json\n```\n\nYou can specify reporter options using the `--reporter-options <reporter-options>` flag.\n\n```\ncypress run --reporter junit --reporter-options mochaFile=result.xml,toConsole=true\n```\n",
      "section": "app",
      "anchors": [
        "cypress-run-reporter-reporter"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 49
    },
    {
      "id": "app/references/command-line#cypress-run-runner-ui",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --runner-ui",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --runner-ui`\n\nTo force Cypress to render the Runner UI, use `--runner-ui`.\n\n```\ncypress run --runner-ui\n```\n\nUseful for when [Test Replay](/llm/markdown/cloud/features/test-replay.md) is enabled and you would still like the Runner UI to be rendered for screenshots and video.\n",
      "section": "app",
      "anchors": [
        "cypress-run-runner-ui"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 55
    },
    {
      "id": "app/references/command-line#cypress-run-spec-spec",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --spec <spec>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --spec <spec>`\n\nRun tests specifying a single test file to run instead of all tests. The spec path should be an absolute path or can be relative to the current working directory.\n\n`--spec` only runs specs that **also match the configured [`specPattern`](/llm/markdown/app/references/configuration.md#e2e)**. Specs located outside the configured `specPattern` will not be found. See [Test files not found when using `spec` parameter](/llm/markdown/app/references/configuration.md#Test-files-not-found-when-using-spec-parameter) for details.\n\n```\ncypress run --spec \"cypress/e2e/examples/actions.cy.js\"\n```\n\nRun tests within the folder matching the glob _(Note: Using double quotes is strongly recommended)_.\n\n```\ncypress run --spec \"cypress/e2e/login/**/*\"\n```\n\nRun tests specifying multiple test files to run.\n\n```\ncypress run --spec \"cypress/e2e/examples/actions.cy.js,cypress/e2e/examples/files.cy.js\"\n```\n\nUse in combination with `--project` parameter. Imagine the Cypress tests are in a subfolder `tests/e2e` of the current project:\n\n```\napp/  node_modules/  package.json  tests/    unit/    e2e/      cypress/        e2e/          spec.cy.js      cypress.config.js\n```\n\nIf we are in the `app` folder, we can run the specs using the following command\n\n```\ncypress run --project tests/e2e --spec ./tests/e2e/cypress/e2e/spec.cy.js\n```\n",
      "section": "app",
      "anchors": [
        "cypress-run-spec-spec"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 216
    },
    {
      "id": "app/references/command-line#cypress-run-tag-tag",
      "doc_id": "app/references/command-line",
      "heading": "cypress run --tag <tag>",
      "heading_level": 4,
      "content_markdown": "#### `cypress run --tag <tag>`\n\nAdd a tag or tags to the recorded run. This can be used to help identify separate runs when displayed in Cypress Cloud.\n\n```\ncypress run  --record --tag \"staging\"\n```\n\nGive a run multiple tags.\n\n```\ncypress run --record --tag \"production,nightly\"\n```\n\nCypress Cloud will display any tags sent with the appropriate run.\n\nTags are also useful for surfacing environment details that Cypress Cloud does not record on its own, such as the Node.js version a run used. By tagging runs with these values you can easily differentiate runs that were executed against different versions in the same matrix. For example, when testing across multiple Node.js versions in CI you can include the version in the tags:\n\n```\ncypress run --record --tag \"node-${nodeVersion}\"\n```\n\nThis makes runs that use the same spec set but a different Node.js version (or any other build/environment detail Cypress Cloud does not capture) easy to tell apart in Cypress Cloud.\n\n**App Quality Profiles**: If you use Cypress Cloud's [accessibility](/llm/markdown/accessibility/get-started/introduction.md) and [UI Coverage reporting](/llm/markdown/accessibility/get-started/introduction.md), a run tag can be mapped to [App Quality Profiles](/llm/markdown/accessibility/configuration/profiles.md) to automatically apply different configuration settings for different types of runs.\n",
      "section": "app",
      "anchors": [
        "cypress-run-tag-tag"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 259
    },
    {
      "id": "app/references/command-line#exit-code",
      "doc_id": "app/references/command-line",
      "heading": "Exit code",
      "heading_level": 4,
      "content_markdown": "#### Exit code\n\nCypress supports two different exit code behaviors. The default behavior is similar to that of Mocha, but is not POSIX compliant: reserved exit codes can be returned for certain conditions. As well, the default behavior can return a false negative when there are a number of tests that fail in multiples of 256: most terminals will apply modulo 256 to any exit code larger than 255.\n\nPOSIX compliant exit codes are available via the `--posix-exit-codes` flag. When this flag is passed, additional conditions can be returned that are not possible with the default behavior, including when Cypress fails due to network errors when connections to Cypress Cloud are required, such as in `--record` or `--parallel` runs.\n\nWhen using POSIX compliant exit codes, the number of failed tests can be determined from the [Module API](/llm/markdown/app/references/module-api.md) or [structured reporter data](/llm/markdown/app/tooling/reporters.md).\n\n| Exit Condition | POSIX Exit Code (with `--posix-exit-codes`) | Default Exit Code (without `--posix-exit-codes`) |\n| --- | --- | --- |\n| All tests pass | 0 | 0 |\n| _n_ tests fail | 1 | _n_ |\n| Cypress could not run due to a network error when connections to Cypress Cloud are required | 112 | 1 |\n| Cypress could not run for any other reason, including no spec files found | 1 | 1 |\n",
      "section": "app",
      "anchors": [
        "exit-code"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 297
    },
    {
      "id": "app/references/command-line#cypress-open",
      "doc_id": "app/references/command-line",
      "heading": "cypress open",
      "heading_level": 3,
      "content_markdown": "### `cypress open`\n\nOpens Cypress.\n\n```\ncypress open [options]\n```\n\n#### Options:\n\nOptions passed to `cypress open` will automatically be applied to the project you open. These persist on all projects until you quit Cypress. These options will also override values in the Cypress configuration file.\n\nBy passing `--browser` and `--e2e` or `--component` when launching a project, you can open Cypress and launch the browser at the same time. If passing the `--browser` flag alone, the browser will launch automatically after being guided through project and/or testing type selection. Otherwise, you will be guided through selecting a browser, project, and/or testing type.\n\n| Option | Description |\n| --- | --- |\n| `--browser`, `-b` | [Run Cypress in the browser with the given name. If a filesystem path is supplied, Cypress will attempt to use the browser at that path.](#cypress-open-browser-lt-browser-path-gt) |\n| `--component` | [Open in component testing mode](/llm/markdown/app/core-concepts/testing-types.md#What-is-Component-Testing) |\n| `--config`, `-c` | [Specify configuration](#cypress-open-config-lt-config-gt) |\n| `--config-file`, `-C` | [Specify configuration file](#cypress-open-config-file-lt-configuration-file-gt) |\n| `--detached`, `-d` | Open Cypress in detached mode |\n| `--e2e` | Open in end to end testing mode (default) |\n| `--env`, `-e` | [Specify secret environment variables](#cypress-open-env-lt-env-gt) |\n| `--expose`, `-x` | [Specify public configuration values](#cypress-open-expose-lt-expose-gt) |\n| `--global` | [Open in global mode](#cypress-open-global) |\n| `--help`, `-h` | Output usage information |\n| `--port`, `-p` | [Override default port](#cypress-open-port-lt-port-gt) |\n| `--project`, `-P` | [Path to a specific project](#cypress-open-project-lt-project-path-gt) |\n\n#### `cypress open --browser <browser-path>`\n\nBy default, Cypress will automatically find and allow you to use the browsers installed on your system.\n\nThe \"browser\" option allows you to specify the path to a custom browser to use with Cypress:\n\n```\ncypress open --browser /usr/bin/chromium\n```\n\nIf found, the specified browser will be added to the list of available browsers.\n\nCurrently, only browsers in the Chrome family (including the new Chromium-based Microsoft Edge and Brave) and Firefox are supported.\n\n[Having trouble launching a browser? Check out our troubleshooting guide](/llm/markdown/app/references/troubleshooting.md#Launching-browsers)\n\n#### `cypress open --config <config>`\n\nSet [configuration](/llm/markdown/app/references/configuration.md) values. Separate multiple values with a comma. The values set here override any values set in your configuration file.\n\n```\ncypress open --config pageLoadTimeout=100000,watchForFileChanges=false\n```\n\nFor more complex configuration objects, you may want to consider passing a [JSON.stringified](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) object.\n\nHere, we're passing in the configuration for component spec files.\n\n```\ncypress open --config \"{\\\"watchForFileChanges\\\":false,\\\"specPattern\\\":[\\\"**/*.cy.js\\\",\\\"**/*.cy.ts\\\"]}\"\n```\n\n#### `cypress open --config-file <configuration-file>`\n\nYou can specify a path to a file where [Cypress configuration](/llm/markdown/app/references/configuration.md) values are set.\n\n```\ncypress open --config-file tests/cypress.config.js\n```\n\n#### `cypress open --env <env>`\n\n**Security Warning**\n\nSecrets passed via CLI may appear in CI logs. For production use, prefer setting secrets via your CI/CD platform's secret management system.\n\nSet secret [environment variables](/llm/markdown/app/guides/environment-variables.md) for use in your tests via [`cy.env()`](/llm/markdown/api/commands/env.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress open --env apiKey=secret-key-12345\n```\n\nPass several variables using commas and no spaces. Numbers are automatically converted from strings.\n\n```\ncypress open --env apiKey=secret-key-12345,apiUrl=https://api.example.com\n```\n\nPass an object as a JSON in a string.\n\n```\ncypress open --env credentials='{\"apiKey\":\"secret-key-12345\",\"dbPassword\":\"secure-password\"}'\n```\n\n#### `cypress open --expose <expose>`\n\nSet public configuration values for use in your tests via [`Cypress.expose()`](/llm/markdown/api/cypress-api/expose.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress open --expose apiVersion=v2,featureFlag=true\n```\n\n#### `cypress open --global`\n\nOpening Cypress in global mode is useful if you have multiple nested projects but want to share a single global installation of Cypress. In this case you can add each nested project to the Cypress in global mode, thus giving you a nice UI to switch between them.\n\n```\ncypress open --global\n```\n\n#### `cypress open --port <port>`\n\n```\ncypress open --port 8080\n```\n\n#### `cypress open --project <project-path>`\n\nBy default, Cypress looks for your `cypress.config.js` (or `cypress.config.ts`) in the current working directory. Use `--project` to open Cypress for a project located in a different directory. This is useful when you have multiple Cypress projects in one repository and want to open a specific one without changing your working directory.\n\n```\ncypress open --project ./some/nested/folder\n```\n",
      "section": "app",
      "anchors": [
        "cypress-open"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 891
    },
    {
      "id": "app/references/command-line#options",
      "doc_id": "app/references/command-line",
      "heading": "Options:",
      "heading_level": 4,
      "content_markdown": "#### Options:\n\nOptions passed to `cypress open` will automatically be applied to the project you open. These persist on all projects until you quit Cypress. These options will also override values in the Cypress configuration file.\n\nBy passing `--browser` and `--e2e` or `--component` when launching a project, you can open Cypress and launch the browser at the same time. If passing the `--browser` flag alone, the browser will launch automatically after being guided through project and/or testing type selection. Otherwise, you will be guided through selecting a browser, project, and/or testing type.\n\n| Option | Description |\n| --- | --- |\n| `--browser`, `-b` | [Run Cypress in the browser with the given name. If a filesystem path is supplied, Cypress will attempt to use the browser at that path.](#cypress-open-browser-lt-browser-path-gt) |\n| `--component` | [Open in component testing mode](/llm/markdown/app/core-concepts/testing-types.md#What-is-Component-Testing) |\n| `--config`, `-c` | [Specify configuration](#cypress-open-config-lt-config-gt) |\n| `--config-file`, `-C` | [Specify configuration file](#cypress-open-config-file-lt-configuration-file-gt) |\n| `--detached`, `-d` | Open Cypress in detached mode |\n| `--e2e` | Open in end to end testing mode (default) |\n| `--env`, `-e` | [Specify secret environment variables](#cypress-open-env-lt-env-gt) |\n| `--expose`, `-x` | [Specify public configuration values](#cypress-open-expose-lt-expose-gt) |\n| `--global` | [Open in global mode](#cypress-open-global) |\n| `--help`, `-h` | Output usage information |\n| `--port`, `-p` | [Override default port](#cypress-open-port-lt-port-gt) |\n| `--project`, `-P` | [Path to a specific project](#cypress-open-project-lt-project-path-gt) |\n",
      "section": "app",
      "anchors": [
        "options"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 307
    },
    {
      "id": "app/references/command-line#cypress-open-browser-browser-path",
      "doc_id": "app/references/command-line",
      "heading": "cypress open --browser <browser-path>",
      "heading_level": 4,
      "content_markdown": "#### `cypress open --browser <browser-path>`\n\nBy default, Cypress will automatically find and allow you to use the browsers installed on your system.\n\nThe \"browser\" option allows you to specify the path to a custom browser to use with Cypress:\n\n```\ncypress open --browser /usr/bin/chromium\n```\n\nIf found, the specified browser will be added to the list of available browsers.\n\nCurrently, only browsers in the Chrome family (including the new Chromium-based Microsoft Edge and Brave) and Firefox are supported.\n\n[Having trouble launching a browser? Check out our troubleshooting guide](/llm/markdown/app/references/troubleshooting.md#Launching-browsers)\n",
      "section": "app",
      "anchors": [
        "cypress-open-browser-browser-path"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 117
    },
    {
      "id": "app/references/command-line#cypress-open-config-config",
      "doc_id": "app/references/command-line",
      "heading": "cypress open --config <config>",
      "heading_level": 4,
      "content_markdown": "#### `cypress open --config <config>`\n\nSet [configuration](/llm/markdown/app/references/configuration.md) values. Separate multiple values with a comma. The values set here override any values set in your configuration file.\n\n```\ncypress open --config pageLoadTimeout=100000,watchForFileChanges=false\n```\n\nFor more complex configuration objects, you may want to consider passing a [JSON.stringified](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) object.\n\nHere, we're passing in the configuration for component spec files.\n\n```\ncypress open --config \"{\\\"watchForFileChanges\\\":false,\\\"specPattern\\\":[\\\"**/*.cy.js\\\",\\\"**/*.cy.ts\\\"]}\"\n```\n",
      "section": "app",
      "anchors": [
        "cypress-open-config-config"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 83
    },
    {
      "id": "app/references/command-line#cypress-open-env-env",
      "doc_id": "app/references/command-line",
      "heading": "cypress open --env <env>",
      "heading_level": 4,
      "content_markdown": "#### `cypress open --env <env>`\n\n**Security Warning**\n\nSecrets passed via CLI may appear in CI logs. For production use, prefer setting secrets via your CI/CD platform's secret management system.\n\nSet secret [environment variables](/llm/markdown/app/guides/environment-variables.md) for use in your tests via [`cy.env()`](/llm/markdown/api/commands/env.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress open --env apiKey=secret-key-12345\n```\n\nPass several variables using commas and no spaces. Numbers are automatically converted from strings.\n\n```\ncypress open --env apiKey=secret-key-12345,apiUrl=https://api.example.com\n```\n\nPass an object as a JSON in a string.\n\n```\ncypress open --env credentials='{\"apiKey\":\"secret-key-12345\",\"dbPassword\":\"secure-password\"}'\n```\n",
      "section": "app",
      "anchors": [
        "cypress-open-env-env"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 121
    },
    {
      "id": "app/references/command-line#cypress-open-expose-expose",
      "doc_id": "app/references/command-line",
      "heading": "cypress open --expose <expose>",
      "heading_level": 4,
      "content_markdown": "#### `cypress open --expose <expose>`\n\nSet public configuration values for use in your tests via [`Cypress.expose()`](/llm/markdown/api/cypress-api/expose.md). See the [Environment Variables & Secrets](/llm/markdown/app/guides/environment-variables.md) guide for more details.\n\n```\ncypress open --expose apiVersion=v2,featureFlag=true\n```\n",
      "section": "app",
      "anchors": [
        "cypress-open-expose-expose"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 43
    },
    {
      "id": "app/references/command-line#cypress-open-global",
      "doc_id": "app/references/command-line",
      "heading": "cypress open --global",
      "heading_level": 4,
      "content_markdown": "#### `cypress open --global`\n\nOpening Cypress in global mode is useful if you have multiple nested projects but want to share a single global installation of Cypress. In this case you can add each nested project to the Cypress in global mode, thus giving you a nice UI to switch between them.\n\n```\ncypress open --global\n```\n",
      "section": "app",
      "anchors": [
        "cypress-open-global"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 76
    },
    {
      "id": "app/references/command-line#cypress-open-project-project-path",
      "doc_id": "app/references/command-line",
      "heading": "cypress open --project <project-path>",
      "heading_level": 4,
      "content_markdown": "#### `cypress open --project <project-path>`\n\nBy default, Cypress looks for your `cypress.config.js` (or `cypress.config.ts`) in the current working directory. Use `--project` to open Cypress for a project located in a different directory. This is useful when you have multiple Cypress projects in one repository and want to open a specific one without changing your working directory.\n\n```\ncypress open --project ./some/nested/folder\n```\n",
      "section": "app",
      "anchors": [
        "cypress-open-project-project-path"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 83
    },
    {
      "id": "app/references/command-line#cypress-info",
      "doc_id": "app/references/command-line",
      "heading": "cypress info",
      "heading_level": 3,
      "content_markdown": "### `cypress info`\n\nPrints information about Cypress and the current environment such as:\n\n*   A list of browsers Cypress detected on the machine.\n*   Any environment variables that control [proxy configuration](/llm/markdown/app/references/proxy-configuration.md).\n*   Any environment variables that start with the `CYPRESS` prefix (with sensitive variables like [record key](/llm/markdown/cloud/account-management/projects.md#Record-key) masked for security).\n*   The location where run-time data is stored.\n*   The location where the Cypress binary is cached.\n*   Operating system information.\n*   System memory including free space.\n\n```\ncypress infoDisplaying Cypress info...Detected 2 browsers installed:1. Chrome  - Name: chrome  - Channel: stable  - Version: 79.0.3945.130  - Executable: /path/to/google-chrome  - Profile: /user/profile/folder/for/google-chrome2. Firefox Nightly  - Name: firefox  - Channel: nightly  - Version: 74.0a1  - Executable: /path/to/firefoxNote: to run these browsers, pass <name>:<channel> to the '--browser' fieldExamples:- cypress run --browser firefox:nightly- cypress run --browser chromeLearn More: https://on.cypress.io/launching-browsersProxy Settings: none detectedEnvironment Variables: none detectedApplication Data: /path/to/app/data/cypress/cy/developmentBrowser Profiles: /path/to/app/data/cypress/cy/development/browsersBinary Caches: /user/profile/path/.cache/CypressCypress Version: 4.1.0System Platform: darwin (19.2.0)System Memory: 17.2 GB free 670 MB\n```\n\n**Tip:** set [DEBUG environment variable](/llm/markdown/app/references/troubleshooting.md#Print-DEBUG-logs) to `cypress:launcher:*` when running `cypress info` to troubleshoot browser detection.\n",
      "section": "app",
      "anchors": [
        "cypress-info"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 232
    },
    {
      "id": "app/references/command-line#cypress-install",
      "doc_id": "app/references/command-line",
      "heading": "cypress install",
      "heading_level": 3,
      "content_markdown": "### `cypress install`\n\nInstalls the Cypress binary that matches the version of the `cypress` npm package into the [global cache](/llm/markdown/app/references/advanced-installation.md#Binary-cache).\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nnpx cypress install\n```\n\n```\nyarn cypress install\n```\n\n```\npnpm cypress install\n```\n\n```\nbunx cypress install\n```\n\nThis command normally runs automatically as a `postinstall` step when you add `cypress` with your package manager, so you rarely need to run it yourself. Running it explicitly is useful when the binary was not downloaded during `npm install`, including these scenarios:\n\n*   Your package manager blocks lifecycle scripts (for example with `--ignore-scripts`, or because a security policy disallows `postinstall`), so you install the binary yourself at a later stage instead of granting Cypress install-time script access.\n*   You want to download and cache the binary on one machine (such as a CI \"install\" stage), then skip the download on every subsequent machine that reuses that [cache](/llm/markdown/app/references/advanced-installation.md#Binary-cache).\n*   The automatic install was skipped on purpose by setting `CYPRESS_INSTALL_BINARY=0`.\n*   You want to [troubleshoot the installation](/llm/markdown/app/references/advanced-installation.md#Troubleshoot-installation) by running the download on its own with [debug logging](/llm/markdown/app/references/troubleshooting.md#Print-DEBUG-logs) enabled.\n\nFor example, add `cypress` while skipping the binary download, then run the install on its own with debug logging enabled:\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nCYPRESS_INSTALL_BINARY=0 npm install cypress --save-dev\n```\n\n```\nCYPRESS_INSTALL_BINARY=0 yarn add cypress --dev\n```\n\n```\nCYPRESS_INSTALL_BINARY=0 pnpm add --save-dev cypress\n```\n\n```\nCYPRESS_INSTALL_BINARY=0 bun add --dev cypress\n```\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nDEBUG=cypress:cli* npx cypress install\n```\n\n```\nDEBUG=cypress:cli* yarn cypress install\n```\n\n```\nDEBUG=cypress:cli* pnpm cypress install\n```\n\n```\nDEBUG=cypress:cli* bunx cypress install\n```\n\nThe binary that gets installed, the cache location, and the download source can be customized through environment variables. See [Advanced Installation](/llm/markdown/app/references/advanced-installation.md) for details.\n\n#### Options\n\n| Option | Description |\n| --- | --- |\n| `--force`, `-f` | [Force install the Cypress binary](#cypress-install-force) |\n| `--help`, `-h` | Output usage information |\n\n#### `cypress install --force`\n\nBy default, `cypress install` does nothing when a binary matching the package version is already present in the [cache](/llm/markdown/app/references/advanced-installation.md#Binary-cache). Pass `--force` to download and reinstall the binary anyway, overwriting any existing installation.\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nnpx cypress install --force\n```\n\n```\nyarn cypress install --force\n```\n\n```\npnpm cypress install --force\n```\n\n```\nbunx cypress install --force\n```\n",
      "section": "app",
      "anchors": [
        "cypress-install"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 524
    },
    {
      "id": "app/references/command-line#options",
      "doc_id": "app/references/command-line",
      "heading": "Options",
      "heading_level": 4,
      "content_markdown": "#### Options\n\n| Option | Description |\n| --- | --- |\n| `--force`, `-f` | [Force install the Cypress binary](#cypress-install-force) |\n| `--help`, `-h` | Output usage information |\n",
      "section": "app",
      "anchors": [
        "options"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 40
    },
    {
      "id": "app/references/command-line#cypress-install-force",
      "doc_id": "app/references/command-line",
      "heading": "cypress install --force",
      "heading_level": 4,
      "content_markdown": "#### `cypress install --force`\n\nBy default, `cypress install` does nothing when a binary matching the package version is already present in the [cache](/llm/markdown/app/references/advanced-installation.md#Binary-cache). Pass `--force` to download and reinstall the binary anyway, overwriting any existing installation.\n\n*   npm\n*   Yarn\n*   pnpm\n*   Bun\n\n```\nnpx cypress install --force\n```\n\n```\nyarn cypress install --force\n```\n\n```\npnpm cypress install --force\n```\n\n```\nbunx cypress install --force\n```\n",
      "section": "app",
      "anchors": [
        "cypress-install-force"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 91
    },
    {
      "id": "app/references/command-line#cypress-verify",
      "doc_id": "app/references/command-line",
      "heading": "cypress verify",
      "heading_level": 3,
      "content_markdown": "### `cypress verify`\n\nVerify that Cypress is installed correctly and is executable.\n\n```\ncypress verify✔  Verified Cypress! /Users/jane/Library/Caches/Cypress/3.0.0/Cypress.app\n```\n\nTo change the default timeout of 30 seconds, you can set the environment variable `CYPRESS_VERIFY_TIMEOUT`:\n\n```\nexport CYPRESS_VERIFY_TIMEOUT=60000 # wait for 60 secondscypress verify\n```\n\nNote that the `cypress verify` command is executed as part of the `cypress open` and `cypress run` commands. The `CYPRESS_VERIFY_TIMEOUT` environment variable should be provided for those commands if you wish to modify the timeout duration.\n\nYou can disable verification by setting the `CYPRESS_SKIP_VERIFY` environment variable to `true`.\n",
      "section": "app",
      "anchors": [
        "cypress-verify"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 123
    },
    {
      "id": "app/references/command-line#cypress-version",
      "doc_id": "app/references/command-line",
      "heading": "cypress version",
      "heading_level": 3,
      "content_markdown": "### `cypress version`\n\nPrints the installed Cypress binary version, the Cypress package version, the version of Electron used to build Cypress, and the bundled Node version.\n\nIn most cases the binary and the package versions will be the same, but they could be different if you have installed a different version of the package and for some reason failed to install the matching binary version.\n\n```\ncypress versionCypress package version: 12.0.0Cypress binary version: 12.0.0Electron version: 21.0.0Bundled Node version: 16.16.0\n```\n\nYou can print each individual component's version number also.\n\n```\ncypress version --component package12.0.0cypress version --component binary12.0.0cypress version --component electron21.0.0cypress version --component node16.16.0\n```\n",
      "section": "app",
      "anchors": [
        "cypress-version"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 139
    },
    {
      "id": "app/references/command-line#cypress-cache-command",
      "doc_id": "app/references/command-line",
      "heading": "cypress cache [command]",
      "heading_level": 3,
      "content_markdown": "### `cypress cache [command]`\n\nCommands for managing the global Cypress cache. The Cypress cache applies to all installs of Cypress across your machine, global or not.\n\n#### `cypress cache path`\n\nPrint the `path` to the Cypress cache folder. You can change the path where the Cypress cache is located by following [these instructions](/llm/markdown/app/references/advanced-installation.md#Binary-cache).\n\n```\ncypress cache path/Users/jane/Library/Caches/Cypress\n```\n\n#### `cypress cache list`\n\nPrint all existing installed versions of Cypress. The output will be a table with cached versions and the last time the binary was used by the user, determined from the file's access time.\n\n```\ncypress cache list┌─────────┬──────────────┐│ version │ last used    │├─────────┼──────────────┤│ 3.0.0   │ 3 months ago │├─────────┼──────────────┤│ 3.0.1   │ 5 days ago   │└─────────┴──────────────┘\n```\n\nYou can calculate the size of every Cypress version folder by adding the `--size` argument to the command. Note that calculating the disk size can be slow.\n\n```\ncypress cache list --size┌─────────┬──────────────┬─────────┐│ version │ last used    │ size    │├─────────┼──────────────┼─────────┤│ 5.0.0   │ 3 months ago │ 425.3MB │├─────────┼──────────────┼─────────┤│ 5.3.0   │ 5 days ago   │ 436.3MB │└─────────┴──────────────┴─────────┘\n```\n\n#### `cypress cache clear`\n\nClear the contents of the Cypress cache. This is useful when you want Cypress to clear out all installed versions of Cypress that may be cached on your machine. After running this command, you will need to run `cypress install` before running Cypress again.\n\n```\ncypress cache clear\n```\n\n#### `cypress cache prune`\n\nDeletes all installed Cypress versions from the cache except for the currently-installed version.\n\n```\ncypress cache prune\n```\n",
      "section": "app",
      "anchors": [
        "cypress-cache-command"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 331
    },
    {
      "id": "app/references/command-line#cypress-cache-path",
      "doc_id": "app/references/command-line",
      "heading": "cypress cache path",
      "heading_level": 4,
      "content_markdown": "#### `cypress cache path`\n\nPrint the `path` to the Cypress cache folder. You can change the path where the Cypress cache is located by following [these instructions](/llm/markdown/app/references/advanced-installation.md#Binary-cache).\n\n```\ncypress cache path/Users/jane/Library/Caches/Cypress\n```\n",
      "section": "app",
      "anchors": [
        "cypress-cache-path"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 43
    },
    {
      "id": "app/references/command-line#cypress-cache-list",
      "doc_id": "app/references/command-line",
      "heading": "cypress cache list",
      "heading_level": 4,
      "content_markdown": "#### `cypress cache list`\n\nPrint all existing installed versions of Cypress. The output will be a table with cached versions and the last time the binary was used by the user, determined from the file's access time.\n\n```\ncypress cache list┌─────────┬──────────────┐│ version │ last used    │├─────────┼──────────────┤│ 3.0.0   │ 3 months ago │├─────────┼──────────────┤│ 3.0.1   │ 5 days ago   │└─────────┴──────────────┘\n```\n\nYou can calculate the size of every Cypress version folder by adding the `--size` argument to the command. Note that calculating the disk size can be slow.\n\n```\ncypress cache list --size┌─────────┬──────────────┬─────────┐│ version │ last used    │ size    │├─────────┼──────────────┼─────────┤│ 5.0.0   │ 3 months ago │ 425.3MB │├─────────┼──────────────┼─────────┤│ 5.3.0   │ 5 days ago   │ 436.3MB │└─────────┴──────────────┴─────────┘\n```\n",
      "section": "app",
      "anchors": [
        "cypress-cache-list"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 153
    },
    {
      "id": "app/references/command-line#cypress-cache-clear",
      "doc_id": "app/references/command-line",
      "heading": "cypress cache clear",
      "heading_level": 4,
      "content_markdown": "#### `cypress cache clear`\n\nClear the contents of the Cypress cache. This is useful when you want Cypress to clear out all installed versions of Cypress that may be cached on your machine. After running this command, you will need to run `cypress install` before running Cypress again.\n\n```\ncypress cache clear\n```\n",
      "section": "app",
      "anchors": [
        "cypress-cache-clear"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 71
    },
    {
      "id": "app/references/command-line#debugging-commands",
      "doc_id": "app/references/command-line",
      "heading": "Debugging commands",
      "heading_level": 2,
      "content_markdown": "## Debugging commands\n\n### Enable Debug Logs\n\nIf you are using macOS, Linux or Windows (Git Bash) and your package manager is npm, you can run Cypress with debug logs using the following CLI command:\n\n```\nDEBUG=cypress:* npx cypress run\n```\n\nSee [Troubleshooting](/llm/markdown/app/references/troubleshooting.md#Print-DEBUG-logs) for more detailed instructions on options to generate debug logs, also with Yarn and pnpm package managers, and with Windows CMD and PowerShell terminal windows.\n",
      "section": "app",
      "anchors": [
        "debugging-commands"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 91
    },
    {
      "id": "app/references/command-line#enable-debug-logs",
      "doc_id": "app/references/command-line",
      "heading": "Enable Debug Logs",
      "heading_level": 3,
      "content_markdown": "### Enable Debug Logs\n\nIf you are using macOS, Linux or Windows (Git Bash) and your package manager is npm, you can run Cypress with debug logs using the following CLI command:\n\n```\nDEBUG=cypress:* npx cypress run\n```\n\nSee [Troubleshooting](/llm/markdown/app/references/troubleshooting.md#Print-DEBUG-logs) for more detailed instructions on options to generate debug logs, also with Yarn and pnpm package managers, and with Windows CMD and PowerShell terminal windows.\n",
      "section": "app",
      "anchors": [
        "enable-debug-logs"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 87
    },
    {
      "id": "app/references/command-line#history",
      "doc_id": "app/references/command-line",
      "heading": "History",
      "heading_level": 2,
      "content_markdown": "## History\n\n| Version | Changes |\n| --- | --- |\n| [15.11.0](/llm/markdown/app/references/changelog.md#15-11-0) | Added `--pass-with-no-tests` flag to `cypress run` |\n| [15.5.0](/llm/markdown/app/references/changelog.md#15-5-0) | Added the 112 exit code scenario when using `--posix-exit-codes` flag |\n| [15.4.0](/llm/markdown/app/references/changelog.md#15-4-0) | Added `--auto-cancel-after-failures` flag to `cypress run` |\n| [5.4.0](/llm/markdown/app/references/changelog.md) | Added `prune` subcommand to `cypress cache` |\n| [5.4.0](/llm/markdown/app/references/changelog.md) | Added `--size` flag to `cypress cache list` subcommand |\n| [4.9.0](/llm/markdown/app/references/changelog.md) | Added `--quiet` flag to `cypress run` |\n",
      "section": "app",
      "anchors": [
        "history"
      ],
      "path": "/llm/json/chunked/app/references/command-line.json",
      "token_estimate": 104
    }
  ]
}