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

opencode-webfetch-plugin

v0.1.4

Published

An opencode plugin that exposes a webfetch tool capable of human-in-the-loop interaction for handling captchas and logins.

Readme

Opencode Google AI Search Plugin

An Opencode plugin that exposes a native tool (google_ai_search_plus) for querying Google AI Mode (aka Google SGE). It uses Playwright to load the AI panel directly and converts the full response into markdown with Turndown so the output renders just like the built-in webfetch tool.

Features

  • Direct navigation to Google AI Mode with stealth browser headers.
  • Waits for the progressive response to stabilise before extraction.
  • Captures headings, lists, tables, and sources from the AI panel.
  • Converts the response to markdown to avoid truncated tool output.
  • Provides rich metadata (response time, source count, table presence) for the assistant model.

Installation

  1. Clone or download this repository.

  2. Install dependencies and build the plugin:

    bun install
    bun run build

    Note: If you encounter TypeScript compilation errors, you may need to fix quote escaping issues in the source code.

    Playwright is declared as a peer dependency. Install it (and Chromium) in the same project that will host the plugin:

    bun install
    npx playwright install chromium

    Note: Use npx instead of bunx if bunx is not available.

  3. Add the plugin to Opencode. You can either:

    • Drop the built files into your project: copy the entire folder somewhere in your repo and add the relative path in opencode.json:

      {
        "plugin": [
          "file:///absolute/path/to/google_ai_search/dist/index.js"
        ]
      }

      Important: Use absolute paths starting with file:/// instead of relative paths to avoid module resolution issues.

    • Or publish this package to npm (e.g. npm publish) and reference it by name:

      {
        "plugin": [
          "opencode-google-ai-search-plugin"
        ]
      }
  4. Restart Opencode. The new tool (google_ai_search_plus) will appear in the tool list.

Usage

Once the plugin is loaded, call the tool from any Opencode session:

google_ai_search_plus "What is the difference between TypeScript and JavaScript?"

Parameters:

| Name | Type | Description | |----------|---------|-------------------------------------------------------------------| | query | string | Question or topic to submit to Google AI Mode. | | timeout| number | Optional timeout in seconds (default 30, max 120). | | followUp | boolean | Treats the query as part of the same conversation (session reuse). |

The tool returns a markdown-formatted answer plus metadata about the response, including source count and whether a comparison table was detected.

Notes

  • Google frequently throttles automated traffic. If you see timeout or “blocking” errors, wait a few minutes or reduce query frequency.
  • The plugin stores no state; each call launches (or reuses) an isolated headless Chromium session via Playwright.
  • Formatting mirrors the built-in webfetch tool so Opencode renders the full AI answer without summarising it.
  • You can customise the tool ID by editing src/index.ts before publishing.

Development

  • bun run build compiles TypeScript to the dist/ folder (ESM output with type declarations).
  • bun run clean removes the build artefacts.
  • Update the version in package.json before publishing to npm.

License

MIT