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-ollama-websearch

v0.1.0

Published

OpenCode plugin for Ollama web search and web fetch

Readme

opencode-ollama-websearch

CI npm version license

OpenCode plugin that exposes Ollama's web search and web fetch APIs as native opencode tools. No Python, no MCP server, no extra runtime — just TypeScript that calls the Ollama REST API directly.

Tools

| Tool | Description | | --- | --- | | ollama_web_search | Search the web. Returns ranked results with title, URL, and snippet. | | ollama_web_fetch | Fetch and extract the main content of a single page. Use after ollama_web_search to read a specific result in depth. |

Both tools return markdown-formatted strings tuned for coding agents.

Install

One-command install (recommended)

curl -fsSL https://raw.githubusercontent.com/justin-carper/opencode-ollama-websearch/main/scripts/install.sh | bash

This adds the plugin to your opencode.json, installs the bundled skill (using-ollama-web-search) and slash commands (/ollama-search, /ollama-fetch), and checks that OLLAMA_API_KEY is set. Restart opencode to pick everything up.

Manual install

Add the plugin to your opencode.json — opencode auto-installs npm plugins via Bun at startup, so no npm install is needed:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-ollama-websearch"]
}

Restart opencode. The tools are now available to the agent.

API key setup

The plugin reads OLLAMA_API_KEY from the environment. Get a free key at https://ollama.com/settings/keys.

Never put the key in opencode.json — that file is often committed and shared.

Usage

Once loaded, the tools are available to the agent alongside built-ins. The agent decides when to call them based on the tool descriptions.

For direct user invocation, install the bundled slash commands (see below):

/ollama-search opencode plugin docs
/ollama-fetch https://opencode.ai/docs/plugins

Bundled skill: using-ollama-web-search

Teaches agents when and how to use the tools. Installed automatically by the one-command install. To install manually:

cp -R skill/using-ollama-web-search ~/.agents/skills/

Bundled slash commands

  • /ollama-search <query> — run ollama_web_search and print results inline.
  • /ollama-fetch <url> — run ollama_web_fetch and print content inline.

Installed automatically by the one-command install. To install manually without the script, copy the files from this repo:

cp commands/ollama-search.md commands/ollama-fetch.md ~/.config/opencode/commands/

Development

bun install
bun test           # 8 tests, mocked fetch
bun run build      # tsc -> dist/
bun run lint       # biome check
bun run lint:fix   # biome check --write

Requires Bun 1.3+. See CONTRIBUTING.md for the full workflow, including how to add a changeset.

Why this exists

The built-in opencode web search uses Exa and is gated behind the OpenCode provider or OPENCODE_ENABLE_EXA. This plugin is Ollama-first: pure TypeScript, works with any provider, and needs no separate MCP server or Python runtime.

License

MIT © Justin Carper