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

@mikasomaka/opencode-googlesearch

v1.0.1

Published

OpenCode plugin for Google Gemini-grounded web search with inline citations.

Readme

@mikasomaka/opencode-googlesearch

OpenCode 插件,提供基于 Google Gemini Google Search 能力 的联网搜索工具,支持内联引用和来源列表。

原本 fork 自 ghoulr/opencode-websearch-cited,但已进行破坏性重构——精简为仅支持 Google Gemini API Key,移除 OpenRouter 和 OpenAI 支持。同时大幅优化了工具描述词,引导 LLM 在需要实时信息时优先调用联网搜索。


特性

  • google_search 工具,通过 Google Gemini API 使用 API Key 认证
  • 精心设计的工具描述,引导 LLM 在涉及实时信息、版本验证、事实查证等场景时优先调用 google_search,提升联网搜索命中率
  • 返回带内联引用 [1] 的结果,并附带 Sources: 来源列表

输出示例:

答案内容包含引用[1],基于搜索结果的引用[2]。

Sources:
[1] 示例来源 (https://example.test/source-1)
[2] 另一个来源 (https://example.test/source-2)

安装

~/.config/opencode/opencode.jsonc 中添加插件:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@mikasomaka/[email protected]"],
  "tools": {
    "google_search": true
  },
  "permission": {
    "google_search": "allow"
  }
}

配置

配置 Google AI Studio API Key 和搜索模型:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "google": {
      "api_key": "YOUR_GOOGLE_AI_STUDIO_API_KEY",
      "options": {
        "google_search": {
          "model": "gemini-3.5-flash"
        }
      }
    }
  }
}

model 字段可选,默认值为 gemini-3.5-flash


开发

本项目使用 Bun 和 TypeScript。

bun install
bun test:agent

本地开发时可用 file:// URL 加载:

{
  "plugin": ["file:///path/to/opencode-googlesearch/index.ts"]
}