local · private · no API keys

zed-rag

Local codebase RAG for coding agents.
Indexes your code into a vector DB and serves it as context via MCP — so your AI assistant actually understands your codebase.

Ollama embeddings Qdrant vector DB MCP protocol continue.dev Ubuntu · WSL2
Architecture

How it works

Three services, all running locally. Zero data leaves your machine.

your code
files
chunker + embedder
Ollama
vector store
Qdrant
context server
zed-rag MCP
coding agent
continue.dev
Installation

Get started

Run these two scripts in order. Both are idempotent — safe to re-run.

1
Install prerequisites

Installs Docker, starts Qdrant as a Docker container, installs Ollama as a systemd service, and pulls the nomic-embed-text embedding model.

bash
curl -fsSL https://github.com/gamaops112/zed_rag/releases/latest/download/setup.sh | bash
2
Install zed-rag

Downloads the binary to /usr/local/bin/zed-rag, writes config to ~/.zed-rag/config.toml, and installs the systemd user service.

bash
curl -fsSL https://github.com/gamaops112/zed_rag/releases/latest/download/install.sh | bash
3
Index your project

Chunks and embeds your codebase into Qdrant. Skips unchanged files on subsequent runs via content hash.

bash
zed-rag index /path/to/your/project
4
Watch for changes (optional)

Re-indexes files on save. Run in a terminal or tmux session alongside your editor.

bash
zed-rag watch /path/to/your/project
Configuration

continue.dev MCP setup

Add zed-rag as an MCP server. Pick your environment:

VS Code Remote WSL means continue.dev runs on the Windows side. Config lives at C:\Users\<you>\.continue\config.yaml. Use the wsl command to spawn the Linux binary.

C:\Users\<you>\.continue\config.yaml
name: AI Models Configuration
version: 1.0.0
schema: v1

mcpServers:
  - name: zed-rag
    command: wsl
    args:
      - /usr/local/bin/zed-rag
    env:
      PROJECT_PATH: /home/user/your-project

VS Code Remote SSH or native Linux desktop. Config lives at ~/.continue/config.yaml.

~/.continue/config.yaml
name: AI Models Configuration
version: 1.0.0
schema: v1

mcpServers:
  - name: zed-rag
    command: /usr/local/bin/zed-rag
    args: []
    env:
      PROJECT_PATH: /home/user/your-project

Replace /home/user/your-project with the absolute path you indexed in step 3. Multiple projects → add multiple mcpServers entries with different PROJECT_PATH values.

Reference

CLI commands

All path arguments default to PROJECT_PATH env var, then current directory.

zed-rag index [path]Index a project once then exit. --force clears and re-indexes from scratch.
zed-rag watch [path]Index then watch for file changes. Re-indexes on save.
zed-rag remove [path]Delete all indexed vectors for a project from Qdrant.
zed-rag serve [path]Full daemon: watch + dashboard on :7702. Used by the systemd service.
zed-rag status [path]Show indexed vector count for a project.
zed-rag (no args)MCP server over stdin/stdout. Spawned automatically by continue.dev.
environment variables
# Override values from ~/.zed-rag/config.toml
PROJECT_PATH=/path/to/project
QDRANT_URL=http://localhost:6333
OLLAMA_URL=http://localhost:11434
EMBEDDING_MODEL=nomic-embed-text
Ignore rules

.zed-rag-ignore

Control exactly what gets indexed. Drop a .zed-rag-ignore file at your project root — gitignore-style patterns, one per line. Changes are picked up automatically within 30 seconds while watch is running, no restart needed.

Always ignored (built-in)

These are hardcoded and cannot be overridden:

always skipped
# Hidden dirs/files — .git  .continue  .idea  .vscode  .env  etc.
# Any path component starting with a dot

# Dependency / build dirs
node_modules   target   dist   build   __pycache__
vendor   coverage   tmp   temp   logs   __generated__   .cache

# Lock & checksum files
*.lock   *.sum

# Files larger than 512 KB (minified / generated)

Per-project .zed-rag-ignore

Place this file at the root of your project (same level as go.mod / package.json / etc.).

.zed-rag-ignore
# Directory pattern (trailing /) — skips entire tree
docs/
migrations/
testdata/
fixtures/
snapshots/

# Filename glob — matches basename only (no slash = any depth)
*.generated.go
*.pb.go
*.min.js
*.min.css

# Specific files
config.toml
*.env
*.sh

# Path with slash — matches relative path from project root
internal/testutil/fixtures/

Pattern rules

docs/Trailing slash → skip entire directory tree. Matches docs/ at any depth.
*.generated.goNo slash → matches against filename only. Works at any depth.
internal/fixtures/Contains slash → matches against path relative to project root.
# commentLines starting with # are ignored.
live reload during watch
# Edit .zed-rag-ignore while watch is running
# New rules take effect within 30 seconds — no restart needed

# Example: package install drops a new dir mid-session
$ npm install some-lib          # watcher picks up some-lib/ immediately
$ echo "some-lib/" >> .zed-rag-ignore   # ignored within 30s