Custom DuckDuckGo web search tool integration for OpenCode. This package exposes a tool that performs HTML scrape-based searches and returns results to the OpenCode runtime.
- Node.js and npm
- OpenCode config with an explicit permission stanza for this tool
-
Copy
websearch_duckduckgo.tsandpackage.jsoninto~/.opencode/toolsor~/.config/opencode/tools. -
Install dependencies in the tools directory:
cd tools
npm install- Enable the tool in your
opencode.jsonby adding a permission stanza. Example:
{
"permissions": {
"websearch_duckduckgo": "allow"
}
}Ask OpenCode in chat to run a DuckDuckGo web search. The tool name is websearch_duckduckgo and it accepts a search query plus an optional result limit.
websearch_duckduckgo.tscontains the tool implementation.package.jsondefines the package metadata and dependencies.