npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aemonculaba/pi-search

v0.2.3

Published

Web search + fetch extension for pi (OpenAI search + Readability extraction)

Downloads

433

Readme

@aemonculaba/pi-search

Web search + fetch extension for pi with an agent-first browse workflow:

  1. web_search(query) → list of results (title, URL, snippet)
  2. web_fetch(url) → clean Markdown content + links found on page

This avoids DDG scraping/rate limits by using OpenAI/Codex native web search.

Tools

web_search

Uses OpenAI web_search tool (Codex OAuth or OpenAI API key) and returns raw results.

web_fetch

Fetches and extracts page content via:

  • Readability + Turndown (default)
  • Playwright + Readability fallback for JS-heavy pages
  • Raw text fallback for non-HTML responses

Also returns links found on the page for follow-up crawling.

Auth priority

  1. openai-codex (/login subscription)
  2. openai API key
  3. OPENAI_API_KEY env var

Local dev (no symlink)

npm install
npx playwright install chromium
pi install /absolute/path/to/pi-search

Then in pi run /reload.

To update while developing, just edit files and run /reload again.

Install from npm in pi

pi install npm:@aemonculaba/pi-search
# or pin a version
pi install npm:@aemonculaba/[email protected]

Release / test install flow

  1. Validate package locally:
npm ci
npm test
npm run pack:check
npm run release:dry-run
  1. Publish a dev tag (for npm-based testing before latest):
npm version prerelease --preid=dev
npm publish --tag dev

Then test in pi:

pi remove npm:@aemonculaba/pi-search || true
pi install npm:@aemonculaba/pi-search@dev
  1. Publish stable (tag + push):
git tag v0.2.0
git push origin v0.2.0

GitHub Action will publish to npm via Trusted Publishing (OIDC), no NPM_TOKEN needed.

  1. Test official install in pi:
pi remove npm:@aemonculaba/pi-search || true
pi install npm:@aemonculaba/[email protected]

CI/CD

  • CI workflow: install, test, package dry-check on push/PR
  • Release workflow: publish to npm on v* tags (or manual dispatch) using npm Trusted Publishing

Policy (baked into extension)

This package includes a web-tool policy that enforces web_search + web_fetch for web access.

When enabled (default):

  • injects guidance into the system prompt each turn
  • blocks known alternate web-search/web-fetch tools
  • optionally blocks bash-based web fetching (curl, wget, raw URLs, etc.)

Config

| Variable | Description | |---|---| | WEBSEARCH_PROVIDER | Force provider (openai) | | WEBSEARCH_MODEL | Override model (default gpt-5.2 for codex) | | OPENAI_API_KEY | API key fallback | | PI_SEARCH_ENFORCE_WEB_POLICY | Enable/disable embedded policy (true by default) | | PI_SEARCH_BLOCK_BASH_WEB | Block bash web-fetch patterns (true by default) | | PI_SEARCH_EXTRA_BLOCKED_TOOLS | CSV list of extra tool names to block | | PI_SEARCH_ALLOWED_WEB_TOOLS | CSV list of blocked tools to allow |

Managing pi extensions and migrating across servers

See docs/PI_AGENT_OPERATIONS.md for a practical playbook:

  • package-based extension management
  • version pinning for reproducibility
  • project-local .pi/settings.json strategy
  • migration checklist for new servers