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

@apmantza/greedysearch-pi

v1.6.0

Published

Pi extension: multi-engine AI search (Perplexity, Bing Copilot, Google AI) via browser automation — NO API KEYS needed. Extracts answers with sources, optional Gemini synthesis. Grounded AI answers from real browser interactions.

Readme

GreedySearch for Pi

Pi extension that adds greedy_search, deep_research, and coding_task tools — multi-engine AI search via browser automation. NO API KEYS needed.

Fans out queries to Perplexity, Bing Copilot, and Google AI simultaneously. Returns AI-synthesized answers with deduped sources. Streams progress as each engine completes.

Forked from GreedySearch-claude.

Quick Note

No API keys required — this tool uses Chrome DevTools Protocol (CDP) to interact with search engines directly through a browser. It launches its own isolated Chrome instance, so it won't interfere with your main browser session.

Install

pi install npm:@apmantza/greedysearch-pi

Or directly from git:

pi install git:github.com/apmantza/GreedySearch-pi

Quick Start

Once installed, Pi gains a greedy_search tool with three depth levels.

greedy_search({ query: "What's new in React 19?", depth: "standard" })

Parameters

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | query | string | required | The search question | | engine | string | "all" | all, perplexity, bing, google, gemini | | depth | string | "standard" | fast (1 engine), standard (3 engines + synthesis), deep (3 + fetch + synthesis + confidence) | | fullAnswer | boolean | false | Return complete answer (~3000+ chars) vs truncated preview (~300 chars) |

Depth Levels

| Depth | Engines | Synthesis | Source Fetch | Time | Best For | |-------|---------|-----------|--------------|------|----------| | fast | 1 | — | — | 15-30s | Quick lookup, single perspective | | standard | 3 | ✅ | — | 30-90s | Default — balanced speed/quality | | deep | 3 | ✅ | ✅ (top 5) | 60-180s | Research that matters — architecture decisions |

Engines (for fast mode)

| Engine | Alias | Best for | |--------|-------|----------| | all | — | All 3 engines — but for fast single-engine, pick one below | | perplexity | p | Technical Q&A, code explanations, documentation | | bing | b | Recent news, Microsoft ecosystem | | google | g | Broad coverage, multiple perspectives | | gemini | gem | Google's AI with different training data |

Streaming Progress

When using engine: "all", the tool streams progress as each engine completes:

**Searching...** ⏳ perplexity · ⏳ bing · ⏳ google
**Searching...** ✅ perplexity done · ⏳ bing · ⏳ google
**Searching...** ✅ perplexity done · ✅ bing done · ⏳ google
**Searching...** ✅ perplexity done · ✅ bing done · ✅ google done

Deep Research Mode

For research that matters — architecture decisions, library comparisons — use depth: "deep":

greedy_search({ query: "best auth patterns for SaaS in 2026", depth: "deep" })

Deep mode: 3 engines + source fetching (top 5) + synthesis + confidence scores. ~60-180s but returns grounded synthesis with fetched evidence.

Standard vs Deep:

  • standard (default): 3 engines + synthesis. Good for most research.
  • deep: Same + fetches source content for grounded answers. Use when the answer really matters.

Legacy: deep_research tool still works — aliases to greedy_search with depth: "deep".

Full vs Short Answers

Default mode returns ~300 char summaries to save tokens. Use fullAnswer: true for complete responses:

greedy_search({ query: "explain the React compiler", engine: "perplexity", fullAnswer: true })

Examples

Quick lookup (fast):

greedy_search({ query: "How to use async await in Python", depth: "fast", engine: "perplexity" })

Compare tools (standard):

greedy_search({ query: "Prisma vs Drizzle in 2026", depth: "standard" })

Deep research (architecture decision):

greedy_search({ query: "Best practices for monorepo structure", depth: "deep" })

Debug an error:

greedy_search({ query: "Error: Cannot find module 'react-dom/client' Next.js 15", depth: "standard" })

Requirements

  • Chrome — must be installed. The extension auto-launches a dedicated Chrome instance on port 9222 with its own isolated profile and DevTools port file, separate from your main browser session.
  • Node.js 22+ — for built-in fetch and WebSocket support.

Setup (first time)

To pre-launch the dedicated GreedySearch Chrome instance:

node ~/.pi/agent/git/GreedySearch-pi/launch.mjs

Stop it when done:

node ~/.pi/agent/git/GreedySearch-pi/launch.mjs --kill

Check status:

node ~/.pi/agent/git/GreedySearch-pi/launch.mjs --status

Testing

Run the test suite to verify everything works:

./test.sh           # full suite (~3-4 min)
./test.sh quick     # skip parallel tests (~1 min)
./test.sh parallel  # parallel race condition tests only

Tests verify:

  • Single engine mode (perplexity, bing, google)
  • Sequential "all" mode searches
  • Parallel "all" mode (5 concurrent searches) — detects tab race conditions
  • Synthesis mode with Gemini

Troubleshooting

"Chrome not found"

Set the path explicitly:

export CHROME_PATH="/path/to/chrome"

"CDP timeout" or "Chrome may have crashed"

Restart GreedySearch Chrome:

node ~/.pi/agent/git/GreedySearch-pi/launch.mjs --kill
node ~/.pi/agent/git/GreedySearch-pi/launch.mjs

Google / Bing "verify you're human"

The extension auto-clicks verification buttons and Cloudflare Turnstile challenges using broad keyword matching — resilient to variations like "Verify you are human" or localised button text. For hard CAPTCHAs (image puzzles), solve manually in the Chrome window that opens.

Parallel searches failing

Each search creates a fresh isolated browser tab that is closed after completion, allowing safe parallel execution without tab state conflicts.

Search hangs

Chrome may be unresponsive. Restart it with launch.mjs --kill then launch.mjs.

Sources are empty or junk links

Sources are now extracted by regex-parsing Markdown links ([title](url)) from the clipboard text captured after each engine responds — not from DOM selectors that break when the engine's UI updates. If sources are empty, the engine's clipboard copy didn't include formatted links (Bing Copilot currently falls into this category).

How It Works

  • index.ts — Pi extension, registers greedy_search tool with streaming progress
  • search.mjs — CLI runner, spawns extractors in parallel, emits PROGRESS: events to stderr
  • launch.mjs — launches dedicated Chrome on port 9222 with isolated profile
  • extractors/ — per-engine CDP scrapers (Perplexity, Bing Copilot, Google AI, Gemini)
  • cdp.mjs — Chrome DevTools Protocol CLI for browser automation
  • skills/greedy-search/SKILL.md — skill file that guides the model on when/how to use greedy_search

Changelog

v1.6.0 (2026-03-29)

  • Merged deep_research into greedy_search — new depth parameter: fast (1 engine), standard (3 engines + synthesis), deep (3 engines + fetch + synthesis + confidence)
  • Simpler API — one tool with clear speed/quality tradeoffs instead of separate tools with overlapping flags
  • Backward compatibledeep_research still works as alias, --synthesize and --deep-research flags still function
  • Updated documentation — README and skill docs now use depth parameter throughout

v1.5.1 (2026-03-29)

  • Fixed npm package — added .pi-lens/ and test files to .npmignore

v1.5.0 (2026-03-29)

  • Code extraction fixedcoding_task now uses clipboard interception to preserve markdown code blocks (was losing them via DOM scraping)
  • Chrome targeting hardened — all tools now consistently target the dedicated GreedySearch Chrome via CDP_PROFILE_DIR, preventing fallback to user's main Chrome session
  • Shared utilities — extracted ~220 lines of duplicate code from extractors into common.mjs (cdp wrapper, tab management, clipboard interception)
  • Documentation leaner — skill documentation reduced 61% (180 → 70 lines) while preserving all decision-making info
  • NO API KEYS — updated messaging to emphasize this works via browser automation, no API keys needed

v1.4.2 (2026-03-25)

  • Fresh isolated tabs — each search now always creates a new about:blank tab via Target.createTarget and refreshes the CDP page cache immediately after, preventing SPA navigation failures and stale DOM state from prior queries
  • Regex-based citation extraction — all extractors (Perplexity, Bing, Gemini) now parse sources from clipboard Markdown links ([title](url)) instead of DOM selectors that break on UI updates
  • Relaxed verification detectionconsent.mjs now uses broad keyword matching (includes('verify'), includes('human')) instead of anchored regexes, correctly catching button text variants like "Verify you are human" across Cloudflare, Microsoft, and generic modals

v1.4.1

  • Fixed parallel synthesis — multiple greedy_search calls with synthesize: true now run safely in parallel. Each search creates a fresh Gemini tab that gets cleaned up after synthesis, preventing tab conflicts and "Uncaught" errors.

v1.4.0

  • Grounded synthesis — Gemini now receives a normalized source registry with stable source IDs, agreement summaries, caveats, and cited claims
  • Real deep research — top sources are fetched before synthesis so deep research answers are grounded in fetched evidence, not just engine summaries
  • Richer source metadata — source output now includes canonical URLs, domains, source types, per-engine attribution, and confidence metadata
  • Cleaner tab lifecycle — temporary Perplexity, Bing, and Google tabs are closed after each fan-out search, and synthesis finishes on the Gemini tab
  • Isolated Chrome targeting — GreedySearch now refuses to fall back to your normal Chrome session, preventing stray remote-debugging prompts

License

MIT