Configuration
Vreko observes your workspace and applies sensible defaults out of the box. The daemon reads the same config for the CLI, VS Code, and MCP - so a .vrekorc change applies everywhere. Configure only when you need to override a default.
Quick Reference
Protection Levels
Watch, Warn, Block - how Vreko treats writes to a file
.vrekorc
Per-workspace settings: protection, sync, learning
.vrekoignore
Exclude paths from observation entirely
VS Code Settings
Editor-side toggles for the extension
Protection Levels
Every tracked file has a protection level that controls what happens when it changes.
| Level | Behavior | Best for |
|---|---|---|
| 🟢 Watch | Observe silently and record a restore point | Source code, docs |
| 🟡 Warn | Record, and surface the change as elevated risk | Config files, dependencies |
| 🔴 Block | Refuse the write | Secrets, .env*, credentials |
Automatic by default. With autoProtectConfigs on, Vreko assigns warn to config files and leaves everything else at the defaultLevel (watch). You only need explicit patterns when you want to override that.
.vrekorc
Create .vrekorc (JSON) at your project root. The daemon merges it over the defaults below - every field is optional.
{
"protection": {
"enabled": true,
"defaultLevel": "watch",
"autoProtectConfigs": true,
"patterns": [
{ "glob": "src/auth/**/*", "level": "block" },
{ "glob": "package.json", "level": "warn" }
]
},
"sync": {
"enabled": false,
"interval": 30000,
"maxRetries": 3
},
"learning": {
"maxAgeDays": 90,
"minUsageCount": 3,
"archiveDir": ".vreko/archive"
}
}
| Key | Default | Description |
|---|---|---|
protection.enabled | true | Master switch for protection levels |
protection.defaultLevel | "watch" | Level for files without a matching pattern: watch / warn / block |
protection.autoProtectConfigs | true | Auto-assign warn to config files |
protection.patterns | [] | Per-glob overrides: { "glob": "...", "level": "..." } |
sync.enabled | false | Sync learnings to the dashboard (Pro; opt-in) |
sync.interval | 30000 | Sync interval in milliseconds |
sync.maxRetries | 3 | Retries before a sync attempt is dropped |
learning.maxAgeDays | 90 | Age after which an unused learning is archived |
learning.minUsageCount | 3 | Times a pattern must recur before it’s retained |
learning.archiveDir | ".vreko/archive" | Where archived learnings are written |
AI-tool detection (Cursor, Copilot, Claude Code, Windsurf) is automatic and has no .vrekorc keys - there is nothing to configure.
.vrekoignore
Exclude paths from observation entirely (same syntax as .gitignore). One glob per line; # lines are comments.
# Dependencies
node_modules/
.pnpm-store/
# Build outputs
dist/
.next/
build/
# Logs and large files
*.log
*.mp4
*.zip
MCP Integration
MCP setup is not a .vrekorc concern. The VS Code extension wires it automatically; for standalone clients (Claude Code, Cursor), see the dedicated guide.
Environment Variables
| Variable | Description |
|---|---|
VREKO_API_KEY | API key for authenticated (Pro) features |
VREKO_STORAGE_PATH | Override the local storage location (default .vreko/) |
VREKO_LOG_LEVEL | debug / info / warn / error |
VREKO_API_URL | Override the API endpoint |
VS Code Settings
Access via ⌘+, → search “vreko”.
| Setting | Default | Description |
|---|---|---|
vreko.mcp.enabled | true | Enable MCP integration |
vreko.mcp.serverUrl | https://mcp.vreko.dev | MCP server endpoint |
vreko.logLevel | "info" | Extension log verbosity |
vreko.showAutoSnapshotNotifications | true | Notify when a restore point is recorded |
vreko.ui.statusBarEnabled | true | Show the Vreko status bar item |
vreko.offlineMode.enabled | false | Run fully offline (no network calls) |