For Playwright Test, run npx --no-install playwright --version from your project directory. If it prints a version, that project can resolve a local Playwright package without downloading anything. If you mean the separate Playwright Agent CLI, check playwright-cli --help (global install) or npx playwright cli --help (local install). These are different tools and a successful check for one does not prove the other is installed.
First identify which Playwright CLI you mean
Current Playwright documentation uses “CLI” for two related but distinct command paths:
| Tool | Package | Typical command | What it is for |
|---|---|---|---|
| Playwright Test CLI | @playwright/test |
npx playwright test |
Running and managing Playwright Test projects |
| Playwright Agent CLI | @playwright/cli |
playwright-cli or npx playwright cli |
The separately documented agent command-line tool |
The safest diagnostic is therefore to run the command for the package and installation scope you actually use.
Check for a project-local Playwright Test installation
The no-download check
- Open a terminal.
- Change to the project directory whose dependencies you want to inspect.
- Run:
npx --no-install playwright --version
A printed version means the local Playwright executable resolved successfully from that project’s dependencies. The --no-install flag matters: it prevents npx from fetching a package merely to satisfy the command, so this tests what is already available locally.
#1 Best Overall
Package-manager equivalents
The official Playwright installation guide also documents these version checks:
npx playwright --version
yarn playwright --version
pnpm exec playwright --version
Use the command that matches your project’s package manager. The ordinary npx playwright --version form can acquire a package when one is not available; use the no-install form when detection, rather than installation, is your goal.
Check command discovery instead of the version
To see the currently available Playwright Test commands and options, run:
npx playwright --help
Help output confirms that the command can start and is useful when you need syntax rather than a version number.
Free tools Windows power users keep installed
One-click scans. No signup required.
Check the Playwright Agent CLI
Global installation
For the separately packaged Agent CLI, try:
playwright-cli --help
If the command prints usage information, the global executable is on your PATH. The Agent CLI installation guide documents installing it globally with:
npm install -g @playwright/cli@latest
After installation, open a new shell if your operating system does not immediately refresh its command lookup.
Local installation
If @playwright/cli is a project dependency, invoke its local form:
npx playwright cli --help
Do not treat playwright-cli --help and npx playwright cli --help as interchangeable tests. The first checks a globally exposed executable; the second resolves the package through the project’s package manager.
Interpret the result correctly
A version is printed
The command and package are available in the scope you tested. Record the exact version when diagnosing a team or CI discrepancy; two directories can resolve different dependency trees.
“command not found” or “not recognized”
Your shell cannot find a global executable with that name. For Playwright Test, rerun the local command from the project root. For Agent CLI, try the local npx playwright cli --help form or install @playwright/cli globally if that is the intended setup.
npx asks to install a package
That means the requested executable was not found in the local dependency context. Cancel the prompt if you only wanted to inspect the installation, then use npx --no-install playwright --version to get an unambiguous local check. Add the appropriate dependency instead of relying on an accidental download.
The wrong project is being checked
Node package resolution is directory-sensitive. Run pwd (macOS/Linux) or cd/your shell’s location command, then verify that the directory contains the intended package.json and lockfile before repeating the version command.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteInstall the missing package
Start a new Playwright Test project
The installation guide shows this command:
npm init playwright@latest
Follow the prompts, then verify the result with:
npx --no-install playwright --version
Add Playwright Test to an existing project
Install the documented test package with your project’s package manager. With npm, that is:
npm install -D @playwright/test
Then run the local version check from the same project directory. If your project uses Yarn or pnpm, use that manager’s equivalent add command and its corresponding version command.
Install the Agent CLI
For a global Agent CLI, use:
npm install -g @playwright/cli@latest
For a project-local setup, add @playwright/cli as a development dependency and invoke it with npx playwright cli --help. Keep this package separate from @playwright/test; installing one does not automatically install the other.
Check whether browser binaries are installed
A working CLI is not the same as an installed browser. Playwright downloads browser executables separately. To list the browsers known to Playwright, run:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
npx playwright install --list
The Playwright browsers documentation describes this listing command and the installation command:
npx playwright install
Use the list command when a version check succeeds but a test fails while launching Chromium, Firefox or WebKit. Install only the browser set your project requires when your environment has storage or network restrictions.
Rank #4
A reliable diagnostic sequence for local and CI environments
- Change to the exact project directory.
- Run
npx --no-install playwright --versionand save the output. - Run
npx playwright --helpif you need to confirm command discovery. - Run
npx playwright install --listto inspect browser binaries separately. - If you intended the Agent CLI, run
playwright-cli --help, thennpx playwright cli --helpto distinguish global from local availability. - Compare the package manager, lockfile and Node environment with the machine where the command works.
In continuous integration, prefer project-local invocations through npx, Yarn or pnpm so the job uses the dependency version declared by the repository rather than an unrelated global install. A non-zero exit status should fail the diagnostic step; do not mask it with a shell fallback that always returns success.
Common failures and fixes
Version command works, but a browser will not launch
Check npx playwright install --list. If the required executable is absent, run npx playwright install and retry. Also check that the CI image permits the browser’s system dependencies and has enough disk space.
Recommended Free Tools
Global and local versions differ
Print the local version with the no-install command, and inspect the global Agent CLI separately. Remove ambiguity by using an explicit project-local command in scripts rather than a bare global executable.
Permission errors during global installation
Use a Node version manager or configure npm’s global prefix instead of forcing an unsafe system-wide write. If you only need the tool for one repository, install it locally and use npx.
Network or proxy errors
A no-install version check should not need to download a package. If it fails, verify that the dependency is actually present. Browser installation does require downloads, so configure the CI proxy or preinstall browsers in the build image.
Shell resolves an old executable
After changing PATH or a global npm installation, open a new terminal. Check the resolved path with your shell’s command-location facility (for example, command -v playwright-cli on POSIX shells or where playwright-cli on Windows) and then rerun the help command.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Or skip the browser setup
If your goal is simply to obtain a website image rather than run Playwright locally, ScreenshotNeo provides a website screenshot API and MCP server. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each cleanup step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers.
One GET request returns PNG, JPEG, WebP or PDF. See the ScreenshotNeo API documentation for all options.
cURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://playwright.dev -o shot.webp
Python
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://playwright.dev"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://playwright.dev' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
The MCP server includes take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. It also supports full-page and element captures, device and viewport settings, dark mode, retina scale, custom CSS and JavaScript, waits, request blocking, headers, cookies, geolocation, caching, signed links, asynchronous jobs and bulk capture.
The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Sign up free for ScreenshotNeo.
FAQ
Is playwright-cli the same as npx playwright?
No. They refer to the Agent CLI and Playwright Test command paths respectively, with different packages and installation scopes.
Can I check installation without changing anything?
Yes. Use npx --no-install playwright --version for a project-local Playwright Test check; it prevents npx from acquiring a package for the check.
Why does a version check pass in my project but fail in CI?
CI may be using a different working directory, lockfile, Node environment or dependency-install step. Run the local version and browser-list commands in the job and compare their output with your local machine.
Does installing Playwright automatically install browsers?
Not necessarily. Inspect browser executables with npx playwright install --list and install them with npx playwright install when needed.
Frequently Asked Questions
Which command should I put in a health check?
For a repository’s Playwright Test dependency, use `npx –no-install playwright –version` and fail the check when it exits nonzero.
How do I verify only the globally installed Agent CLI?
Run `playwright-cli –help`; do not substitute the project-local `npx playwright cli –help` command.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

