Prerequisites
- OpenCode installed
- OpenViking installed:
pip install openviking --upgrade --force-reinstall - OpenViking CLI configured at
~/.openviking/ovcli.conf - OpenViking Server running with
~/.openviking/ov.conf
Installation
1
Install OpenViking
2
Configure Server
Create
~/.openviking/ov.conf:For Volcengine, Anthropic, DeepSeek, Ollama, and other providers, see the Configuration Reference.
3
Start OpenViking Server
4
Add Plugin to OpenCode
Edit Restart OpenCode — the skill is installed automatically.
~/.config/opencode/opencode.json:Usage
Index a Repository
Simply ask in the chat:Indexing Times:
- Small repos (< 100 files): 2–5 minutes
- Medium repos (100–500 files): 5–20 minutes
- Large repos (500+ files): 20–60+ minutes
Search Indexed Repos
Once indexed, searches happen automatically when relevant:- Detect you’re asking about an indexed repo (FastAPI)
- Load the
openvikingskill - Run semantic search:
ov find "dependency injection" --uri viking://resources/fastapi --limit 10 - Read relevant files and answer your question
Explicit Search
You can also trigger searches explicitly:Browse Indexed Repos
How It Works
Directory Structure
OpenViking organizes code in a virtual filesystem:abstract: One-line summary for quick scanningoverview: Detailed breakdown of purpose and structure
Search Types
The plugin uses three search strategies:
Examples:
Context Injection
When indexed repos are available, the plugin injects context into the system prompt:Advanced Features
Narrow Search Scope
For faster, more precise results, narrow the URI scope:Read Content
Remove Repository
Configuration
Auto-Start Server
The plugin automatically starts the OpenViking server if:ovcommand is installed~/.openviking/ov.confexists- Server is not already running
CLI Config
Create~/.openviking/ovcli.conf:
Troubleshooting
Command not found: ov
Command not found: ov
OpenViking CLI is not installed:
Connection error
Connection error
Server is not running. Check if If config doesn’t exist, create it first (see Installation step 2).
~/.openviking/ov.conf exists:Skill not loading
Skill not loading
Verify the skill was installed:If missing, reinstall the plugin or manually copy the skill file from the OpenViking repo.
Searches return no results
Searches return no results
Check if the repo is indexed:If your repo is missing, add it:
