AIAny
AI Client2026
GitHub

playwright-cli

Command-line tool for browser automation: record and generate Playwright scripts, inspect selectors, capture screenshots. Writes snapshots and screenshots to disk rather than into an LLM's context, cutting token use ~4x versus Playwright MCP.

Introduction

The fastest way to blow a coding agent's budget is to hand it a browser. Every accessibility snapshot and screenshot an MCP server streams back lands in the model's context, and a single automation task can burn ~114k tokens. This tool inverts that contract: artifacts go to disk, and the agent reads only the fragments it decides it needs — the same task drops to ~27k tokens.

What Sets It Apart
  • Disk-first, not context-first. Snapshots, DOM, and screenshots are written to files; the agent pulls slices on demand instead of paying for the whole tree every step. That is the ~4x token reduction Playwright's own benchmarks report.
  • No schema tax. Unlike an MCP server, there is no large tool schema to load up front — commands are discovered like any CLI, which fits the SKILL-style workflows that Claude Code and GitHub Copilot now favor.
  • Real Playwright underneath. Recording emits actual Playwright code you can commit as a test, so exploratory clicking becomes a maintainable script rather than a throwaway transcript.
Where It Fits

The CLI and Playwright MCP attack the same problem from opposite ends. MCP keeps browser state resident and introspectable, which pays off for self-healing tests and long autonomous loops where continuous page context matters more than token cost. The CLI assumes the agent is already juggling a large codebase and a tight context window, and optimizes for getting in, acting, and getting out cheaply.

Who It's For

Great fit if you run high-throughput coding agents that automate browsers alongside heavy code reasoning, or if MCP token bills have become the bottleneck. Look elsewhere if your workflow leans on persistent, continuously-introspected browser state — a long exploratory or self-healing loop — where MCP's resident context is the point rather than the cost.

Information

  • Websitegithub.com
  • OrganizationsMicrosoft
  • AuthorsMicrosoft Corporation
  • Published date2026/01/23

Categories

More Items

GitHub
AI Agent2026

Coordinates multiple coding agents in one workspace: an assistant delegates tasks, tracks their progress, and reports back. Runs locally and uses the model plans or keys you already have.

GitHub
AI Client2026

Runs research, writing, code review, and cross-app tasks from your desktop, with controls over what its agents can do. It works with cloud or local models and pairs approvals with activity logs and sandboxing.

GitHub
AI Client2026

Continue using Harness and AI coding workspaces on your work computer from a browser, phone, or another PC. Connections prioritize end-to-end encrypted P2P, with no public port required on the Host.