# Playwright CLI

[BASE product page](<https://base.akulich.dev/en/library/playwright-cli/>) · [Resource](<https://github.com/microsoft/playwright-cli>)

ID: playwright\-cli · Language: en
Schema version: 1 · Data version: cbbe7123b47a5ae80983

This is editorial data. An unknown field neither confirms nor rules out a capability.
dataVersion is a dataset fingerprint, not evidence of a recent fact check.

Microsoft's official CLI for controlling a browser from the command line and an AI agent: page snapshots, actions using element references, input, navigation, and screenshots\. The skill gives the agent a compact way to work with a browser\.

## Type

CLI and skill for browser automation

## Entry type

tool

## Separate catalog

No

## [Access conditions](<https://base.akulich.dev/en/library/playwright-cli/#resource-access>)

free

## [What you can use for free](<https://base.akulich.dev/en/library/playwright-cli/#resource-access>)

The CLI and included skill are free under Apache 2\.0; automation runs in your environment\.

## [Paid features and costs](<https://base.akulich.dev/en/library/playwright-cli/#resource-access>)

Separate AI model, CI, or cloud browser plans are not included\.

## [Access and limitations](<https://base.akulich.dev/en/library/playwright-cli/#resource-access>)

The CLI runs in your own environment; AI agent costs are not included in the tool's license\.

## [Use cases](<https://base.akulich.dev/en/library/playwright-cli/#resource-tasks>)

- Reproduce an interface error through a sequence of actions
- Test a user workflow in a browser
- Capture screenshots and page states for diagnostics

## Tech stack

- Node\.js
- JavaScript
- TypeScript

## Category IDs

- quality
- skills

## Subcategory IDs

- quality\.testing
- quality\.responsive
- quality\.debugging
- skills\.development

## Tags

- Playwright
- CLI
- Browser
- Testing
- Codex

## Also known as

- microsoft/playwright\-cli
- @playwright/cli

## [Selection purpose](<https://base.akulich.dev/en/library/playwright-cli/#resource-selection>)

Reproduce an interface error through a sequence of actions

## [Choose this when](<https://base.akulich.dev/en/library/playwright-cli/#resource-selection>)

- Reproduce an interface error through a sequence of actions
- Test a user workflow in a browser
- Capture screenshots and page states for diagnostics

## [Consider alternatives when](<https://base.akulich.dev/en/library/playwright-cli/#resource-selection>)

- When choosing for this topic, compare Playwright CLI with Playwright MCP\. A candidate to compare under the topic: Responsive design and browsers, Testing and diagnostics\. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together\.

## [Requirements](<https://base.akulich.dev/en/library/playwright-cli/#resource-selection>)

- The README requires Node\.js 18\+\. Named sessions use \-s; \-\-headed provides a visible browser\.

## [Limitations](<https://base.akulich.dev/en/library/playwright-cli/#resource-selection>)

- Costs and limits of free use: Separate AI model, CI, or cloud browser plans are not included\.
- Terms of use: Apache 2\.0\. Installed browser and third\-party service licenses apply separately\.
- This is a separate product from Playwright MCP, with a different repository and CLI interface\.
- An accessibility tree snapshot does not replace accessibility testing\.
- The CLI launches a headless browser by default; an individual session's state and a saved profile are different modes that must be selected explicitly\.

## [Questions before use](<https://base.akulich.dev/en/library/playwright-cli/#resource-faq>)

### What can you use for free in Playwright CLI?

The CLI and included skill are free under Apache 2\.0; automation runs in your environment\.

### What additional costs might arise with Playwright CLI?

Separate AI model, CI, or cloud browser plans are not included\.

### What terms of use matter for Playwright CLI?

Apache 2\.0\. Installed browser and third\-party service licenses apply separately\.

### Which environment can you use Playwright CLI in?

Tech stack: Node\.js, JavaScript, TypeScript\.

### How do you get started with Playwright CLI?

Configure the CLI and skill according to the official README\. Open the test page, obtain a snapshot, and perform actions on its elements in sequence\. Save a snapshot or screenshot of the problematic state and verify the fix with the same workflow\.

### What should you consider when choosing Playwright CLI?

The README requires Node\.js 18 or newer; check versions and browser support before installation\.

### Does Playwright CLI retain browser state after closing?

By default, the profile stays in memory: cookies and storage are available during the session but are lost after closing\. \-\-persistent saves the profile to disk; state\-save/state\-load explicitly save and load state\.

## Related resources selected by editors

- microsoft\-playwright\-mcp: A candidate to compare under the topic: Responsive design and browsers, Testing and diagnostics\. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together\.

## Sources for the selection guide

- [https://github\.com/microsoft/playwright\-cli](<https://github.com/microsoft/playwright-cli>)
- [https://github\.com/microsoft/playwright\-cli/blob/main/LICENSE](<https://github.com/microsoft/playwright-cli/blob/main/LICENSE>)
- [https://raw\.githubusercontent\.com/microsoft/playwright\-cli/HEAD/README\.md](<https://raw.githubusercontent.com/microsoft/playwright-cli/HEAD/README.md>)
- [https://raw\.githubusercontent\.com/microsoft/playwright\-cli/HEAD/LICENSE](<https://raw.githubusercontent.com/microsoft/playwright-cli/HEAD/LICENSE>)

## [Possible workflow](<https://base.akulich.dev/en/library/playwright-cli/#resource-scenario>)

Repeat a user workflow and find the point of failure

A possible workflow; this is not a report of hands-on testing.

## Before you start

- A test page and workflow steps
- A compatible Node\.js environment and browser

## Steps

1. Configure the CLI and skill according to the official README\.
2. Open the test page, obtain a snapshot, and perform actions on its elements in sequence\.
3. Save a snapshot or screenshot of the problematic state and verify the fix with the same workflow\.

## Check your result

- Actions run on the intended test address\.
- Check the expected state, rather than only whether a click succeeded\.

## [License](<https://base.akulich.dev/en/library/playwright-cli/#resource-license>)

Apache 2\.0\. Installed browser and third\-party service licenses apply separately\.

## License explanations for the specified scope

### Apache 2\.0 — permissive license with patent terms

You can use and modify the code in commercial and closed\-source projects\. When distributing it, retain the license and relevant notices, identify modified files, and include NOTICE if provided\. Authors grant a limited patent license for their contributions; it does not grant permission to use trademarks\.

[License terms](<https://www.apache.org/licenses/LICENSE-2.0>)

## Related resource IDs

- microsoft\-playwright\-mcp

## [Usage details](<https://base.akulich.dev/en/library/playwright-cli/#resource-notes>)

This is a separate product from Playwright MCP, with a different repository and CLI interface\. The README requires Node\.js 18 or newer; check versions and browser support before installation\. An accessibility tree snapshot does not replace accessibility testing\.

## [Sources](<https://base.akulich.dev/en/library/playwright-cli/#resource-sources>)

- [Official README and differences from MCP](<https://github.com/microsoft/playwright-cli>)
- [Apache 2\.0](<https://github.com/microsoft/playwright-cli/blob/main/LICENSE>)
- [Official source](<https://raw.githubusercontent.com/microsoft/playwright-cli/HEAD/README.md>)
- [Official source](<https://raw.githubusercontent.com/microsoft/playwright-cli/HEAD/LICENSE>)

## Editorial review date

2026\-10\-06

## Editorial review scope

The purpose and published terms have been reviewed against the cited primary sources\. This page does not confirm that the product was run or tested in every environment\.

Dates refer to the stated editorial review, not hands-on testing, a product update, or a recent review of all sources.
