Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cypress-cli

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-cli

CLI for Cypress.io Desktop App

  • 0.12.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Cypress CLI Circle CI

This is the CLI for: https://github.com/cypress-io/cypress.

View our progress: https://www.pivotaltracker.com/n/projects/1531501

What this does

This is the Cypress CLI tool used for communicating with the real Cypress Desktop Application.

For instance you can do common tasks like:

  • Installing Cypress
  • Running Cypress Headlessly
  • Generating API Keys

Installation

npm install -g cypress-cli

This will make the cypress command globally available from your command line.

You can now execute the following commands:

Available Commands

cypress install
cypress update
cypress run
cypress ci
cypress open
cypress get:path
cypress get:key
cypress new:key
cypress remove:ids
cypress verify
cypress version

--

cypress install

Installs the Cypress Desktop Application to the default location for each Operating System.

OSPath
Mac/Applications/Cypress.app
Linux/home/<user>/.cypress/Cypress
## by default will install the latest version
cypress install
## install a specific version
cypress install --cypress-version 0.13.0

Additionally if you have a CYPRESS_VERSION environment variable set, it will automatically download that version. Useful in CI.

Watch a video of Cypress being installed

cypress update

Updates Cypress to the latest version. This does the same thing as cypress install.

## now we have the latest version
cypress update

cypress run

Runs Cypress headlessly. By default will run all your tests. Useful when developing locally.

## by default will use your current path
cypress run
## or you can specify a path to the project
cypress run /users/john/projects/TodoMVC
## specify a port to use which overrides values in cypress.json
cypress run --port 8080
## specify a mocha reporter to use
cypress run --reporter json
## specify options for the mocha reporter
cypress run --reporter-options mochaFile=result.xml,toConsole=true
## specify a spec to run instead of running all the tests
cypress run --spec cypress/integration/app_spec.js
## specify environment variables
cypress run --env host=api.dev.local
## specify configuration values which override cypress.json
cypress run --config pageLoadTimeout=100000,watchForFileChanges=false

You can read more about environment variables and configuration here.

cypress ci

Run Cypress headlessly in CI. Read the Continuous Integration docs for examples.

Note: cypress ci supports all the same flags as cypress run.

## provide the CI secret key directly
cypress ci 1234-abcd-efgh-9876
## or if its setup in an env variable called CYPRESS_CI_KEY
cypress ci

cypress open

Opens the Cypress application. This is the same thing as double-clicking the application.

In Mac you'll see the cy icon in the tray, and in Linux you'll see the Cypress application window open.

Arguments you pass to cypress open will automatically be applied to the projects you open. These persist onto all projects until you quit the Cypress Desktop Application.

## specify a port to use which overrides values in cypress.json
cypress open --port 8080
## specify configuration values which override cypress.json
cypress open --config pageLoadTimeout=100000,watchForFileChanges=false
## specify environment variables
cypress open --env host=api.dev.local

cypress get:path

Returns the path Cypress will be install to. Additionally checks to see if Cypress already exists at that path.

cypress get:key

Returns your secret project key for use in CI.

cypress new:key

Creates a new secret project key and returns that key for use in CI. This will negate previous secret keys, so be sure to update your CI to use this new key.

cypress remove:ids

Removes the test IDs found in your specs. In versions of Cypress prior to 0.14.0 we inserted IDs directly into your code.

This feature has been removed for the foreseeable future.

cypress verify

Verifies that the Cypress application is found.

cypress version

Outputs both the version of the CLI Tool and the installed Cypress application.

Upcoming Commands

These commands have not yet been released:

cypress login
cypress set:path
cypress add:project
cypress remove:project

Contributing

 npm test                                             ## run tests
 npm run test-debug                                   ## run tests w/node inspector
 npm version [major | minor | patch] -m "release %s"  ## update version
 npm publish                                          ## publish to npm

Changelog

0.12.0
  • added cli arg for passing reporterOptions
0.11.1
  • cypress ci accepts --spec argument
0.11.0
  • cypress open now accepts arguments
  • you can now pass the --config flag to cypress run, ci, and open which overrides cypress.json configuration values

FAQs

Package last updated on 02 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc