Skip to main content
The OpenViking plugin for OpenCode provides semantic search across your indexed repositories. Once installed, the AI can search through any repo you’ve added to OpenViking, understanding concepts and intent rather than just matching keywords.

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

Verify it’s running:
4

Add Plugin to OpenCode

Edit ~/.config/opencode/opencode.json:
Restart OpenCode — the skill is installed automatically.

Usage

Index a Repository

Simply ask in the chat:
The AI will execute:
Indexing runs in the background. Check status:
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:
The AI will:
  1. Detect you’re asking about an indexed repo (FastAPI)
  2. Load the openviking skill
  3. Run semantic search: ov find "dependency injection" --uri viking://resources/fastapi --limit 10
  4. Read relevant files and answer your question
You can also trigger searches explicitly:

Browse Indexed Repos

Executes:

How It Works

Directory Structure

OpenViking organizes code in a virtual filesystem:
Each directory has AI-generated summaries:
  • abstract: One-line summary for quick scanning
  • overview: 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:
This ensures the AI knows what’s available and when to use it.

Advanced Features

Narrow Search Scope

For faster, more precise results, narrow the URI scope:

Read Content

Remove Repository

This permanently deletes the repo and all indexed content. The AI will confirm before executing.

Configuration

Auto-Start Server

The plugin automatically starts the OpenViking server if:
  • ov command is installed
  • ~/.openviking/ov.conf exists
  • Server is not already running
It waits up to 30 seconds for the server to become healthy.

CLI Config

Create ~/.openviking/ovcli.conf:
The plugin will auto-create this if missing.

Troubleshooting

OpenViking CLI is not installed:
Server is not running. Check if ~/.openviking/ov.conf exists:
If config doesn’t exist, create it first (see Installation step 2).
Verify the skill was installed:
If missing, reinstall the plugin or manually copy the skill file from the OpenViking repo.
Check if the repo is indexed:
If your repo is missing, add it:

Example Workflow

See Also