sincecutoff.com
← all changes

Playwright CLI mode and command set

Introduced 2026-01-24 · score 0.95

HOW TO USE IT

When implementing or debugging a repository feature, install the CLI and read its help. Open the target page, take a snapshot to get element refs, then use the documented commands to inspect or interact with it.

npm install -g @playwright/mcp@latest playwright-cli --help playwright-cli open <url> playwright-cli snapshot playwright-cli click <ref>
playwright-cli open <url> --headed
playwright-cli --session=<name> open <url> playwright-cli session-list

WHY THIS HELPS

Use Playwright commands from a coding agent to inspect and interact with a web page while implementing or debugging a repository feature.

REQUIREMENTS AND LIMITATIONS

  • Version: v0.0.58
  • Requires npm install -g @playwright/mcp@latest; install skill with `/plugin marketplace add microsoft/playwright-cli` and `/plugin install playwright-cli`, or manually download `SKILL.md` as shown in the spans
  • <url> (required): URL to open.
  • --headed: Show the browser when opening a page; CLI is headless by default.
  • <ref> (required): Element reference used by commands such as click; obtain refs from a snapshot.
  • [button]: Mouse button for click or double-click.
  • --session=<name>: Select a browser session/profile.
  • PLAYWRIGHT_CLI_SESSION: Environment variable to select a session for the coding agent.
  • <func> (required): JavaScript expression evaluated on the page or element.
  • [min-level]: Minimum console message level to list.
  • Prerequisite: Install with npm, then run `playwright-cli --help`.
  • Prerequisite: The release note says coding-agent environments may install the skill through plugin commands or manually from the official repository.
  • This is the first snapshot with the essential command set, which is expected to grow.
  • Playwright CLI is headless by default; use `--headed` with `open` to see the browser.
  • The dedicated persistent profile preserves cookies and other storage state between calls.
  • Use `--session` to address a specific browser profile; separate sessions provide separate profiles.
  • Docs conflict: Newer official CLI documentation uses package `@playwright/cli`, while the v0.0.58 release note specifies `@playwright/mcp`; use the release-note package for this card's version. https://github.com/microsoft/playwright-cli
  • Docs conflict: Newer official CLI documentation uses `-s=<name>` and `list` for sessions, while the v0.0.58 release note documents `--session=<name>` and `session-list`; use the release-note syntax for this card's version. https://github.com/microsoft/playwright-cli

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card