Install
Install with PiG
pig install npm:pi-browserInstall with Pi
pi install npm:pi-browserReview before installing
Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./extensions"
]
}README
Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.
pi-browser
A publishable pi package that registers a Playwright-backed browser tool named pi-browser.
It loads a single URL in headless Chromium and returns concise rendered output:
titlefinalUrlstatuswhen available- rendered
text - optional truncated
html
Install
pi install npm:pi-browser
npx playwright install chromium
Then restart pi or run:
/reload
Linux may need:
npx playwright install --with-deps chromium
Local development
npm install
npx playwright install chromium
pi
This repo keeps:
extensions/pi-browser.ts— publishable package entry.pi/extensions/pi-browser.ts— local auto-discovery shim for pi in this repo
Tool inputs
url— requiredwaitUntil—load,domcontentloaded,networkidle,committimeoutMswaitForSelectorwaitForSelectorState—attached,detached,visible,hiddenextraWaitMsmode—text(default),html,both
Example
{
"url": "https://example.com",
"waitUntil": "load",
"timeoutMs": 30000,
"mode": "text"
}
Publish
npm run typecheck
npm pack --dry-run
npm login
npm publish
For a scoped package, use:
npm publish --access public