npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

playwright-cli-select

v1.0.8

Published

Playwright interactive cli prompts to select and run specs, tests or tags

Readme

playwright-cli-select demo

Features

  • ❓ New interactive CLI prompts to select and run specs, tests or tags
  • 🎭 A new playwright test command to allow user to pass desired arguments

External Resources

Table of Contents


Installation

Install the following package:

npm install --save-dev playwright-cli-select
# within your Playwright repository as dev dependency

Or:

npm install -g playwright-cli-select
# global install

Run mode

Run the following command in your Playwright repository:

npx playwright-cli-select run

If you want to skip straight to selecting specs, titles and/or tags:

npx playwright-cli-select run --specs
# skips straight to spec selection
npx playwright-cli-select run --titles
# skips to test title selection
npx playwright-cli-select run --tags
# skips to tag selection
npx playwright-cli-select run --titles --tags
# skips to test title selection, followed by tag selection
# Any combination of `--specs`, `--titles` and/or `--tags` parameters is permitted.

playwright-cli-select --specs --titles --tags demo


Command line arguments

You can also include more cli arguments similar to npx playwright test:

npx playwright-cli-select run --project firefox webkit

Using last failed

Passing Playwright's --last-failed parameter filters the available selections in each prompt to the last failed tests.

Using this package, you can further drill down on specific tests within the last failed tests:

npx playwright-cli-select run --last-failed

playwright-cli-select --last-failed demo


Using only changed

Passing Playwright's --only-changed parameter filters available selections to the changed tests detected.

To specify a specific subset of changed tests rather than running entire changed test files:

npx playwright-cli-select run --only-changed

playwright-cli-select --only-changed demo


UI mode

You can append the --ui or --headed parameters to open a browser and view selected specs, test titles and/or tags:

npx playwright-cli-select run --ui

Or:

npx playwright-cli-select run --titles --headed
# Example of choosing only test titles to run headed

Keyboard controls

| 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


Help mode

To open the cli help menu, pass the --help flag:

npx playwright-cli-select run --help

playwright-cli-select help menu


Submit focused

When no other options are already selected, automatically select the currently focused option with Enter.

To enable this feature, pass the following flag:

npx playwright-cli-select run --submit-focused

Optional path to test list json

This package uses the npx playwright test --list --reporter=json command to gather information about Playwright tests.

If you prefer or already house the data from this command in a file, pass the path to the file via the --json-data-path parameter:

npx playwright-cli-select run --json-data-path data/sample-test-list.json

Using a custom playwright config file

If you want to use a custom Playwright config, pass it via the -c or --config flag:

npx playwright-cli-select run --config playwright.staging.config.js

Or:

npx playwright-cli-select run -c playwright.dev.config.js

Setting up a npm script

For 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": {
    "pw:select": "npx playwright-cli-select run --project=firefox"
  }

Contributions

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.