
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
cypress-cli-select
Advanced tools
Cypress interactive cli prompts to select and run specs, tests or tags.

cypress run command to allow user to pass desired argumentsnpm scriptnpm install --save-dev cypress-cli-select
In order to run specific tests by their title or tag, install the following plugin:
npm install --save-dev @bahmutov/cy-grep
Follow the installation and setup for @bahmutov/cy-grep in the project README
If you use @cypress/grep, you can use this package for specs or tag selection, but this package uses functionality not currently supported by @cypress/grep to allow for other uses.
If you want to select e2e specs to run, simply run the following command:
npx cypress-cli-select run
For selecting component specs:
npx cypress-cli-select run --component
If you want to skip straight to selecting specs, titles or tags:
npx cypress-cli-select run --specs
# skips straight to spec selection
npx cypress-cli-select run --titles
# skips to test title selection
npx cypress-cli-select run --tags
# skips to tag selection
npx cypress-cli-select run --specs --tags
# skips to spec selection, followed by tag selection
npx cypress-cli-select run --specs --titles
# skips to spec selection, followed by title selection
Note: You cannot pass both the --titles and --tags arguments.
You can also include more cli arguments similar to cypress run, as the command harnesses the power of Cypress module API:
# Example
npx cypress-cli-select run --component --browser=chrome
| Keys | Action |
|---|---|
| Up | Move to selection above current |
| Down | Move to selection below current |
| Tab | Select current |
| Ctrl + a | Select all |
| Backspace | Remove selection |
| Enter | Proceed |
| Ctrl + c | Exit |
Note: You can also filter choices displayed in list by typing
If @bahmutov/cy-grep package is installed in your project, test titles and tags are available to select.

To open the cli help menu, pass the --help flag:
npx cypress-cli-select run --help

If you are interested in running selected specs in a specific order, pass the following flag:
npx cypress-cli-select run --choose-spec-pattern
Note: If you pass --choose-spec-pattern you will not have the choice to run test titles or tags.
| Keys | Action |
|---|---|
| Up | Move to selection above current |
| Down | Move to selection below current |
| Shift + ⬆ | Reorder current up |
| Shift + ⬇ | Reorder current down |
| Enter | Confirm order |

If you want to print all selected specs, tests or tags just prior to Cypress run, pass the following flag:
npx cypress-cli-select run --print-selected

When no other options are already selected, automatically select the currently focused option with Enter.
To enable this feature, pass the following flag:
npx cypress-cli-select run --submit-focused
If you want to use a custom Cypress config, pass it via --config-file flag:
npx cypress-cli-select run --config-file tests/cypress.config.js
npm scriptFor convenience, you may desire to house the npx command within an npm script in your project's package.json, including any desired cli arguments:
"scripts": {
"cy:select": "npx cypress-cli-select run --browser=firefox"
}
For more information on Typescript support involved with @bahmutov/cy-grep package, refer to it's README.
Feel free to open a pull request or drop any feature request or bug in the issues.
Please see more details in the contributing doc.
FAQs
A Cypress cli prompt to select and run specs, tests or tags
The npm package cypress-cli-select receives a total of 426 weekly downloads. As such, cypress-cli-select popularity was classified as not popular.
We found that cypress-cli-select demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.