GitHub - microsoft/playwright-cli: CLI for common Playwright actions. Record and generate Playwright code, inspect selectors and take screenshots.
a month ago
- #CLI
- #Browser Automation
- #Playwright
- Playwright CLI provides a token-efficient CLI interface for coding agents, avoiding verbose schemas and accessibility trees.
- CLI + SKILLs are better for high-throughput coding agents, while MCP is suited for specialized agentic loops requiring persistent state.
- Install Playwright CLI globally with npm and use commands like `playwright-cli open`, `type`, `press`, `check`, and `screenshot` for browser automation.
- Supports sessions for managing multiple browser profiles, with commands like `session-list`, `session-stop`, and `session-delete`.
- Includes a wide range of commands for browser interactions, including typing, clicking, dragging, hovering, and more.
- Configuration can be managed via a JSON file or environment variables, covering browser settings, timeouts, and output modes.
- Environment variables allow customization of browser behavior, permissions, and security settings.