pi-browser-debug
Reliable Playwright browser automation for Pi
Package details
Install pi-browser-debug from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-browser-debug- Package
pi-browser-debug- Version
2.0.0- Published
- Jul 30, 2026
- Downloads
- 182/mo · 65/wk
- Author
- nandafirmans
- License
- MIT
- Types
- extension
- Size
- 22 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-browser-debug
Reliable Playwright browser automation for Pi. It can launch an isolated Chromium browser or attach to an existing loopback-only Chrome DevTools Protocol (CDP) browser.
Install
pi install npm:pi-browser-debug
# development
pi install /path/to/pi-browser-debug
For managed mode, install Playwright's Chromium binary once:
npx playwright install chromium
Secure CDP attachment
CDP grants full access to tabs, cookies, and authenticated browser sessions. This extension intentionally accepts only localhost, 127.0.0.1, and ::1 CDP endpoints.
# Linux example: use a separate profile; do not expose port 9222 on your network.
google-chrome-stable --remote-debugging-port=9222 --user-data-dir=/tmp/pi-browser-debug
Model workflow
browser_openopens managed Chromium by default, or attaches withmode: "cdp".browser_navigateopens a page.browser_observereturns interactive elements with refs such ase1.browser_actuses a ref for click, fill, press, hover, select, scrolling, waits, screenshots, or uploads.browser_eventsreports persistent console, failed-request, and HTTP-error events.browser_closeshuts down managed browsers or disconnects CDP sessions.
Tools
| Tool | Purpose |
|---|---|
browser_open |
Launch managed Chromium or attach to local CDP |
browser_navigate |
Navigate a named tab |
browser_observe |
Inspect interactive page elements and create refs |
browser_act |
Perform actions by ref or CSS selector |
browser_run |
Evaluate page JavaScript |
browser_events |
Read persistent browser diagnostics |
browser_tabs |
List named tabs |
browser_select |
Select an attached page by URL substring |
browser_close |
Close named or all automation tabs |
Run checks with npm run check.