pi-chrome-dev-tools

extensionmaintained

Pi extension — lazy-launch Chrome with Playwright, persistent profile, stealth patches, simple browser tools

by · v0.1.0 · published 3mo ago

$ pi install npm:pi-chrome-dev-tools
downloads/mo
207
stars
3
last push
1mo ago
open issues
2

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

423 downloads · last 12 weeks (weekly)

README

pi-chrome-dev-tools

Lazy-launch browser control for pi agents. Uses your system Chrome with a persistent profile — logins, cookies, and extensions carry across sessions. Stealth-patched to avoid bot detection out of the box.


Why chrome-dev-tools?

chrome-dev-toolspi-browser-harnessPlaywright MCP
Zero setup — no remote debugging, no flags❌ manual Chrome config
Instant startup — browser launches on first tool call❌ connects at pi start
Persistent login — cookies survive across sessions
Bot detection avoidance — stealth patches built in
System Chrome — no Chromium download❌ 150MB+ download
AX tree + click coordinatespartial
Pi-native — no MCP overhead

Quick Start

pi install npm:pi-chrome-dev-tools

That's it. No Chrome flags, no remote debugging setup. The first chrome_navigate call launches Chrome automatically.

Requirements

  • pi (latest)
  • Node.js ≥ 22
  • Google Chrome installed

Tools

Page Inspection

ToolPurpose
chrome_snapshotDEFAULT — accessibility tree with @(x,y) click coordinates
chrome_execute_jsEvaluate JS in page context — surgical DOM reads
chrome_page_infoURL, title, viewport size, scroll position
chrome_screenshotCapture PNG (visual verification only)

Navigation

ToolPurpose
chrome_navigateNavigate to a URL (launches Chrome on first call)
chrome_go_back / chrome_go_forwardHistory navigation
chrome_reloadReload current page
chrome_wait / chrome_wait_for_loadWait N seconds or for page load

Interaction

ToolPurpose
chrome_clickClick at viewport coordinates from chrome_snapshot
chrome_typeType text into focused element
chrome_press_keyPress a key (Enter, Tab, Escape, arrows, etc.)
chrome_scrollScroll the page

Tabs

ToolPurpose
chrome_list_tabsList open tabs with URLs
chrome_switch_tabSwitch to tab by index
chrome_new_tabOpen a new tab
chrome_close_tabClose a tab

Lifecycle

ToolPurpose
chrome_closeClose browser (relaunches on next tool call)

Patterns

Page inspection (default workflow)

chrome_snapshot()           → AX tree with @(x,y) per interactive element
chrome_execute_js(expr)     → surgical reads for specific values
chrome_screenshot()         → ONLY for visual verification

Form filling

chrome_snapshot()                        # find the input @(x,y)
chrome_click({ x, y })                   # focus it
chrome_type({ text: "hello" })           # type
chrome_press_key({ key: "Tab" })         # next field

Data extraction

chrome_execute_js({ expression: "document.querySelector('.price').innerText" })

Multi-tab research

chrome_new_tab({ url: "https://..." })
chrome_list_tabs()
chrome_switch_tab({ index: 0 })

How it works

  • Playwright drives a dedicated Chrome instance via CDP
  • Persistent profile at ~/.chrome-dev-tools/profile preserves logins
  • System Chrome via channel: "chrome" — no Chromium download
  • Stealth via @mr_ozio/playwright-stealth — patches navigator.webdriver, plugin arrays, permissions API, and more
  • Lazy launch — Chrome only starts when a tool is first called
  • Auto-cleanup — browser closes when the pi session ends

License

MIT