# Playwright CLI

> Command-line browser automation tool optimized for AI coding agents and testing.

Playwright CLI provides a command-line interface for automating browsers using Playwright. Unlike traditional full-tree model integrations, it exposes actions as concise commands that keep context usage token-efficient for agents like Claude Code and GitHub Copilot. It includes support for persistent sessions, DOM element snapshots, live monitoring dashboards, and media recording.

Website: https://github.com/microsoft/playwright-cli

## What it is for

- Equip AI coding agents like Claude Code to test frontend web applications
- Inspect accessibility trees and grab DOM snapshots from terminal commands
- Capture screenshots and record interaction videos during automated test runs
- Control and debug multiple browser sessions simultaneously using a visual dashboard

## Features

- Token-efficient CLI actions tailored as skills for AI coding agents
- Snapshot engine returning element reference IDs for easy targeting
- Session management with memory caching or persistent profile disk storage
- Visual dashboard for monitoring multiple live sessions and taking remote control
- Video recording with action callouts, custom cursors, and chapter markers
- Built-in device and color scheme emulation for testing responsive designs
- Support for cookie, localStorage, and sessionStorage manipulation

## Pricing

Open source. Free and open-source (Apache-2.0)

## Details

- Type: GitHub repo
- Category: [Development](https://xiry.app/topics/development.md)
- Topic: [Browser Automation](https://xiry.app/topics/development/browser-automation.md)
- Open source: yes
- Platforms: Command line, macOS, Windows, Linux
- For: Software developers and AI agents automating frontend testing and browser tasks
- Alternative to: Puppeteer, Cypress, Selenium
- Tags: playwright, cli, browser automation, testing, ai agents, claude code

## Why it was saved

- [@chase.h.ai, 3 August 2026](https://www.instagram.com/reel/Dblx-7rJUPG/): Allows coding agents to execute browser interactions, test UI edge cases, and capture snapshots without requiring manual user testing.

## Compare

- [Alternatives to Puppeteer](https://xiry.app/alternatives/puppeteer.md)

## Related

- [agent-browser](https://xiry.app/resources/agent-browser): Browser automation CLI and engine purpose-built for AI agents (GitHub repo, Open source)
- [Browser Use Cloud](https://xiry.app/resources/browser-use-cloud): Cloud-hosted stealth browser infrastructure and execution platform for AI agents. (Web app, Freemium)
- [Hyperbrowser App Examples](https://xiry.app/resources/hyperbrowser-app-examples): Open-source web apps and AI browser tools built with Hyperbrowser (GitHub repo, Open source)
- [PinchTab](https://xiry.app/resources/pinchtab-2375): Lightweight Go binary exposing an HTTP API to control Chrome browsers (GitHub repo, Open source)
- [agent-browser Environments](https://xiry.app/resources/agent-browser-environments): Run browser automation agents inside on-demand isolated sandbox environments (Web app, Free)
- [autobrowse](https://xiry.app/resources/autobrowse): Self-improving browser automation skill for AI coding agents (GitHub repo, Open source)

Updated 3 October 2026. Page: https://xiry.app/resources/playwright-cli

Make your own library: Xiry takes your saved reels, tweets, Reddit bookmarks and Watch Later videos, makes them searchable and pulls the useful stuff out, like this library. It's invite-only for now; join the waitlist at https://xiry.app/#waitlist.
