Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Cypress CLI

$ cypress Official Med Risk
Cypress.io · Browser & Web · MIT · macos / linux / windows

Cypress CLI (cypress) executes JavaScript/TypeScript browser E2E and component tests headlessly via cypress run. Agents must avoid cypress open (which launches a blocking GUI) and pass --reporter json or --spec to scope runs.

FCRS-1.0 Score
76 /100
Good
Medium Confidence
Zero-Friction Install
npm install -D cypress
CLI vs MCP Decision CLI Only

Run existing Cypress test suites deterministically with npx cypress run; prefer playwright or agent-browser for lightweight ad-hoc checks.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 16 / 25

cypress run --headless --reporter json works non-interactively, but default spec runs print heavy Mocha ASCII banners, record videos, and cypress open blocks.

  • cypress run supports --headless and --reporter json; cypress open launches GUI
Trust & Safety 19 / 25

Runs local Electron/Chromium against configured app URLs; writes screenshots/videos into cypress/ on failures.

  • Generates local screenshot/video artifacts on test runs
Setup & Portability 10 / 15

Heavy binary download (~500+ MB Electron/Cypress app cache) with Linux shared-library requirements.

  • Large Electron binary cache downloaded on npm install
Utility & Efficiency 13 / 15

Essential for repos already invested in Cypress E2E tests, though slower and heavier than Playwright or Hurl.

  • Standard runner for .cy.js/.cy.ts test suites
Maintenance & Lineage 9 / 10

Official Cypress.io project (cypress-io/cypress) under MIT license.

  • Official cypress-io/cypress repository
Docs & Verifiability 9 / 10

Comprehensive CLI documentation at docs.cypress.io.

  • Official docs at docs.cypress.io/guides/guides/command-line

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key
Credential Storage

Optional Cypress Cloud --key / CYPRESS_RECORD_KEY env var for dashboard recording; local test runs need no credentials.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

MIT open-source CLI; optional Cypress Cloud dashboard has free + paid tiers.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Cypress CLI Agent Rules
- Never run `cypress open` inside agent shells—it launches a blocking Electron GUI.
- Always scope runs with `--spec <glob>` and `--headless` to avoid multi-minute full-suite timeouts and video bloat.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run a single Cypress spec headlessly with JSON reporter
npx cypress run --headless --spec cypress/e2e/smoke.cy.js --reporter json

Executes one spec headlessly without launching the Cypress GUI and emits JSON results.

Controlled Writes & Previews

Run headless suite and save JUnit XML report
npx cypress run --headless --browser chrome --reporter junit --reporter-options mochaFile=results/cypress.xml

Runs the suite against headless Chrome and writes structured JUnit XML artifacts.

Strengths for Agents

  • + Runs existing .cy.ts/.cy.js E2E suites headlessly in CI and coding-agent verification loops.
  • + Supports --spec scoping and Mocha --reporter json output.

Caveats & Pitfalls

  • ! Heavy Electron binary download and slow cold-start (~5–10s before tests run).
  • ! cypress open spawns a blocking desktop GUI; stdout logs are noisy unless piped or filtered.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI