@alexion42/pi-web-search

Single-tool Exa-powered web search and URL reading for Pi coding agent

Packages

Package details

extension

Install @alexion42/pi-web-search from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@alexion42/pi-web-search
Package
@alexion42/pi-web-search
Version
0.2.2
Published
Jun 8, 2026
Downloads
849/mo · 183/wk
Author
alexion42
License
MIT
Types
extension
Size
98.6 KB
Dependencies
5 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Pi Web Search

Lean web search for Pi, powered by Exa. A lean fork of nicobailon/pi-web-access.

npm version License: MIT

Install

pi install npm:@alexion42/pi-web-search

Works immediately with no API keys — Exa MCP provides zero-config search. For direct API access, add your key to ~/.pi/web-search.json:

{
  "exaApiKey": "exa-..."
}

Requires a recent Pi release using the @earendil-works/pi-* package namespace.

What's Available

Tool Description
web Single web tool: mode: "search" finds sources, mode: "read" reads one known URL, mode: "get" reloads a stored result by resultId
/search Interactive command to browse stored web results
Activity monitor Ctrl+Shift+W to view live request/response activity

Content extraction uses a robust fallback chain: Readability → RSC parser → Jina Reader. Full parameter reference and examples are in TOOLS.md.

Configuration

All config lives in ~/.pi/web-search.json. Every field is optional.

{
  "exaApiKey": "exa-...",
  "githubClone": {
    "enabled": true,
    "maxRepoSizeMB": 350,
    "cloneTimeoutSeconds": 30,
    "clonePath": "/tmp/pi-github-repos"
  },
  "shortcuts": {
    "activity": "ctrl+shift+w"
  }
}

EXA_API_KEY env var takes precedence over config file values. Config changes require a Pi restart.

How It Works

web({ mode: "search", query })
  → Exa (direct API with key, MCP without)

web({ mode: "read", url })
  → GitHub URL?  Clone repo, return file contents + local path
  → HTTP fetch → PDF? Extract text, save to ~/Downloads/
               → HTML? Readability → RSC parser → Jina Reader
               → Text/JSON/Markdown? Return directly

web({ mode: "get", resultId })
  → Load stored search or URL-read results from the current session

Limitations

  • PDFs are text-extracted only (no OCR for scanned documents).
  • GitHub branch names with slashes may misresolve file paths; the clone still works and the agent can navigate manually.
  • Non-code GitHub URLs (issues, PRs, wiki) fall through to normal web extraction.

Comparison with Other Pi Search Extensions

Extension Backends Differentiator
nicobailon/pi-web-access Perplexity, Gemini, Exa Upstream — curator, YouTube, video
ronnieops/pi-search-hub 12 backends RRF combine mode, auto-fallback
code-yeongyu/pi-websearch 11 backends + native OpenAI/Anthropic Provider routing, keyless DDG
ayagmar/pi-codex-web-search OpenAI Codex CLI Wraps local codex CLI
iaptsiauri/pi-surf Brave + custom providers Scout subagent, pluggable providers
NicoAvanzDev/pi-web-extension Brave, DDG (keyless) Prompt steering, token-aware

This project's niche: GitHub cloning + Exa MCP zero-config in a lean package, now exposed through a single web tool for simpler model tool-calling. No multi-provider routing, no browser UI, no video.