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.
Three services, all running locally. Zero data leaves your machine.
Run these two scripts in order. Both are idempotent — safe to re-run.
Installs Docker, starts Qdrant as a Docker container, installs Ollama as a systemd service, and pulls the nomic-embed-text embedding model.
curl -fsSL https://github.com/gamaops112/zed_rag/releases/latest/download/setup.sh | bash
Downloads the binary to /usr/local/bin/zed-rag, writes config to ~/.zed-rag/config.toml, and installs the systemd user service.
curl -fsSL https://github.com/gamaops112/zed_rag/releases/latest/download/install.sh | bash
Chunks and embeds your codebase into Qdrant. Skips unchanged files on subsequent runs via content hash.
zed-rag index /path/to/your/project
Re-indexes files on save. Run in a terminal or tmux session alongside your editor.
zed-rag watch /path/to/your/project
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.
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.
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.
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. |
# 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
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.
These are hardcoded and cannot be overridden:
# 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)
Place this file at the root of your project (same level as go.mod / package.json / etc.).
# 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/
| docs/ | Trailing slash → skip entire directory tree. Matches docs/ at any depth. |
| *.generated.go | No slash → matches against filename only. Works at any depth. |
| internal/fixtures/ | Contains slash → matches against path relative to project root. |
| # comment | Lines starting with # are ignored. |
# 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