Library › Book 1 › The Playwright CLI -- Browser Control for Coding Agents
The Playwright CLI -- Browser Control for Coding Agents
5.1🔒Why Microsoft Built a Second Front DoorIn early 2026, Microsoft shipped a standalone command-line tool -- @playwright/cli -- built specifically for AI coding agents, and began…
5.2🔒Installation and Skill SetupSetup is three commands:
5.3🔒The Disk-First ArchitectureThe key design decision -- and the reason for the token savings -- is where browser state goes:
5.4🔒The 4x Benchmark -- and Its Honest CaveatsThe headline numbers: ~27,000 tokens per typical task through the CLI versus ~114,000 through MCP. Roughly 4x. You will use these numbers…
5.5🔒When CLI, When MCPMicrosoft's own guidance reduces to one question: does the agent have filesystem access?
5.6🔒Key Takeaways- In early 2026 Microsoft shipped @playwright/cli and began recommending it over their own MCP server for coding-agent workflows. - The…
5.7🔒Q&ASelf-Assessment Quiz1. What are the two numbers in Microsoft's published token benchmark, and what is the approximate ratio? 2. What does playwright-cli…
5.8🔒Exercises[Beginner] Exercise 5.1: Install the CLI (npm install -g @playwright/cli@latest), run playwright-cli install --skills, and read the…
5.9🔒Career Translation- Adopted the Playwright CLI with skill-based agent integration, cutting per-task context consumption roughly 4x versus MCP (per…
5.10🔒Q&AInterview Depth CheckPrompt: Microsoft ships both Playwright MCP and the Playwright CLI. Explain why they recommend the CLI for coding agents, at the level of…