# pi-playwright-browser Isolated Chromium tools for the [Pi coding agent](https://github.com/earendil-works/pi-mono), powered by Playwright. **Early release. Use trusted test sites first.** This is not an official Pi or Playwright project. [Documentation](https://sunnybharne.github.io/pi-playwright-browser/) · [Safety](docs/safety.md) · [Architecture](docs/design.md) ## Install Use Node 22.19+ and Pi. The tested Pi API baseline is **0.85.1**. ```bash pi install git:github.com/sunnybharne/pi-playwright-browser ``` Start Pi, or run `/reload` in an existing session. Then: ```text /pw setup ``` Approve the Chromium download. It uses several hundred MB. Nothing is downloaded during package installation; old browser caches are left alone. Ask Pi: ```text Open https://example.com and tell me its heading. ``` Pi asks before first site access and, by default, every page action. Page data can reach your model provider and Pi history. ## Included - Eight tools: browser, tabs, navigation, snapshots, actions, waits, screenshots, logs. - Strict locators, explicit frame IDs, and stale-snapshot checks. - Headless or visible Chromium, separate from your personal browser. - Cancellation, session cleanup, private screenshots, and output limits. - TUI approvals and RPC approval requests. Noninteractive access is denied unless configured. For manual login: ```text /pw start --headed /pw pause ``` Log in inside the automation browser, then run `/pw resume`. Close an existing headless browser with `/pw close` before changing mode; closing loses login state. Never paste passwords into chat. ## Limits Not a security sandbox. Origin checks are not a network firewall. Redaction is best-effort. No personal Chrome profiles, saved logins, uploads, accepted downloads, arbitrary JavaScript tool, or remote browser server. Firefox and WebKit are not included. ## Develop ```bash npm ci --ignore-scripts npm run browser:install npm run check npm test npm run docs:build pi -e ./src/index.ts ``` Tests use local fixture sites and Pi RPC, not live accounts or paid model calls. See [development](docs/development.md) for platform coverage. MIT license.