web_search + web_scrape for the pi
coding agent, backed by the crw web scraper.
pi has no native web capability — out of the box its agent can only reach the
web by shelling out to curl. pi-crw registers two first-class tools and
advertises them in the agent's system prompt, so the model reaches for them
instead of curl.
npx github:us/pi-crw install # or: bunx github:us/pi-crw installThat copies the extension into pi's extensions dir
(~/.pi/agent/extensions/crw.ts). Open a new pi session and the agent has
web_search and web_scrape. No config needed.
npx github:us/pi-crw status # is it installed? which backend?
npx github:us/pi-crw uninstall # remove itInstalled straight from the GitHub repo (no npm registry). For a pinned version use
npx github:us/pi-crw#v0.1.0 install, or clone and runnode bin/pi-crw.mjs install.
| Environment | Mode | Notes |
|---|---|---|
CRW_API_URL set |
HTTP | POST {url}/v1/scrape / /v1/search. fastcrw.com cloud or a local crw serve. Add CRW_API_KEY for cloud. |
| unset | CLI | Spawns the crw binary (CRW_BIN, else crw on PATH). |
If no backend resolves, the tools are simply not registered — pi keeps
working exactly as before. Other tunable: CRW_TIMEOUT_MS (default 60000).
HTTP
web_searchneeds the target server to have SearXNG configured. fastcrw.com cloud bundles it; a self-hostedcrw serveneeds the SearXNG sidecar. The CLI backend works out of the box.
This package is MIT. crw itself is AGPL-3.0. pi-crw bundles no crw
source code — it only invokes a separately distributed crw binary
(subprocess) or a crw HTTP endpoint. The boundary is a stable CLI/HTTP
protocol, never linking or bundling, so the MIT package and AGPL crw stay
cleanly separate.
bun install
bun run typecheck
bun run test # deterministic: mock crw binary + mock HTTP serverSee .claude/CLAUDE.md for the project's conventions and the license rationale.