GitHub repository search for OpenCode with automatic DeepWiki integration for technical answers.
- GitHub-First Search: Searches for GitHub repositories and extracts technical answers directly from code
- DeepWiki Integration: Uses DeepWiki for authoritative Q&A on any GitHub repository
- Automatic Repo Detection: Identifies GitHub repos from search results and maps them to owner/repo format
- Simple Workflow: Search web → Extract GitHub repos → Query DeepWiki → Return results
- Cross-Platform: Works on Windows, macOS, and Linux
- TypeScript + ESM: Built with TypeScript for type safety, uses ESM for OpenCode plugin compatibility
- Bun-Native: Zero build step, runs TypeScript natively with Bun
Add to your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["opencode-intellisearch"]
}Or install locally in your project:
bun add -d opencode-intellisearchThen add to your project's opencode.json:
{
"plugins": ["opencode-intellisearch"]
}Once installed, the plugin automatically adds the /search-intelligently command to OpenCode:
/search-intelligently How does React useEffect work?
/search-intelligently Tools for validating semver specification strings
/search-intelligently Best way to handle file uploads in Next.js
/search-intelligently Compare Zod vs Yup for validation libraries
/search-intelligently github:vercel/next.js app router patterns- Bun - Download from bun.sh
- GitHub CLI (
gh) - Direct GitHub repository search (preferred when available)- Install from cli.github.com
- Run
gh auth loginto authenticate - To opt out: deny
ghtool permission in OpenCode
Required:
- deepwiki - Repository Q&A (docs)
Configure in ~/.config/opencode/opencode.json or project opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcpServers": {
"deepwiki": {
"url": "https://mcp.deepwiki.com/mcp"
}
}
}- GitHub CLI (if authenticated) → Direct GitHub API search with topics/language
- Search Tool (websearch, etc.) → Web search with
site:github.comoperator - Fetch Tool (webfetch) → URI-based search with engine cycling (Brave → DDG → Google)
- Detect Tools → Check gh CLI, search tool, or fetch tool availability
- Search Repositories → Use best available method to find GitHub repositories
- Extract Repositories → Map results to owner/repo format (skip if gh CLI used)
- Query DeepWiki → Ask questions about detected repositories
- Return Results → Present authoritative answers from repository documentation and code
"bun command not found" - Bun is not installed:
- Install Bun from bun.sh:
curl -fsSL https://bun.sh/install | bash
Plugin not loading:
- Check OpenCode logs:
~/.local/share/opencode/log/ - Verify plugin is in
opencode.jsonplugins array - Ensure Bun is installed and in PATH
"deepWiki unavailable" - Falling back to webfetch:
- Verify deepWiki MCP server is configured in opencode.json
- Check MCP server status with
/mcp status
All tools failed:
- Try rephrasing your query
- Check MCP server status with
/mcp status - Verify internet connectivity
Remove from opencode.json plugins array:
{
"plugins": []
}Or for local installs:
bun remove opencode-intellisearch# Install dependencies
bun install
# Type check
bun run check
# Run unit tests
bun test
# Link for local testing
bun linkThe plugin includes comprehensive E2E tests using the OpenCode SDK:
# Quick test (explicit mode, 1 run)
bun test:e2e
# Multiple runs for metrics
bun test:e2e --runs 3
# Test both skill loading modes
bun test:e2e --mode both
# Set baseline after changes
bun test:e2e --set-baselineSee CONTRIBUTING.md for detailed testing instructions.
MIT License - see LICENSE
Contributions welcome! See CONTRIBUTING.md
Built with: