Installation & setup

From clone to first query

Two paths: a guided /vdb-setup interview inside your agent, or the manual steps below. Both are non-destructive and re-runnable.

Requirements

Before you start

Python 3.12+

The indexer and MCP server are stdlib-heavy. uv recommended; pip works.

A markdown vault

Obsidian, Logseq, Foam, or any folder of .md files with YAML frontmatter.

An MCP-capable agent

Claude Code, OpenCode, Cursor, or Antigravity. Skills auto-install to each.

Minimal path.

Only running the indexer + MCP server? You need just pip install pyyaml. Everything else (TUI, validation, browser) is an optional extra.

Manual install

Step by step

Clone & sync the dev environment

This installs the vdb command onto your PATH.

bash
$ git clone https://github.com/btilford/vault-db-template.git
$ cd vault-db-template
$ mise run setup        # uv sync — pyyaml, textual, jsonschema, websocket-client

Install skills into your agents

bootstrap.sh detects Claude Code, OpenCode, Pi, Antigravity, and Gemini, then installs every skill into a shared hub with per-agent symlinks.

bash
$ ./bootstrap.sh --dry-run    # preview
$ ./bootstrap.sh              # full install
$ ./bootstrap.sh --check      # installed vs outdated

Configure features with the TUI configurator

The Textual TUI collects your vault root + which table groups to enable, and writes vdb-config.yaml. Full configurator docs →

bash
$ vdb tui                     # pick packs, set vault path
$ vdb config apply --yes      # bake paths into the engine copies (optional)
Two ways to point at a vault.

Preferred: let installed vdb resolve the vault at runtime (--vault > --context > $VDB_VAULT > walk-up to vdb-config.yaml > registry). Backwards-compat: vdb config apply writes the path constants into the deployed engine copies for systemd.

Build the index

Embeddings are heavy and optional — default to --no-embed unless semantic search is the point.

bash
$ vdb index --full --no-embed        # full rebuild, fast
$ vdb index --incremental --no-embed # only changed files
$ vdb status                         # resolved vault + why
$ sqlite3 vault-index.db ".tables"   # inspect

Register the MCP server with your agent

Point your harness at vdb serve (or the standalone server). Stamp an agent name so multi-agent telemetry is distinguishable.

.mcp.json
{
  "mcpServers": {
    "vault": {
      "command": "vdb",
      "args": ["serve"],
      "env": { "VAULT_AGENT": "claude-code" }
    }
  }
}

Smoke-test it directly with one JSON-RPC line:

bash
$ echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"vault_status","arguments":{}}}' \
    | vdb serve

Verify with fixtures

Generates content matching your config, prints verification commands, cleans up after.

bash
$ vdb fixtures --list   # preview
$ vdb fixtures          # create + verification commands
$ vdb fixtures --clean  # remove when done
The guided path

Or just run /vdb-setup

The wizard interviews you about your vault, use cases, and agent ecosystem; detects available models per harness; backs up the existing vault; then generates and implements a tailored plan. Nothing is written until you approve. Re-runnable — it reads vault-setup.json and resumes.

flowchart TD BS["./bootstrap.sh
detect agents · install skills"] WS["/vdb-setup"] P1["Interview
vault · use cases · agents"] P3["Generate plan
structure · schema · skills"] AP{"approve?"} BK["Backup vault + configs"] IM["Implement
dirs · index · MCP · skills · timers"] VR["Verify · AGENTS.md · periodic skills"] DN["vault ready"] BS --> WS --> P1 --> P3 --> AP AP -->|revise| P3 AP -->|approved| BK --> IM --> VR --> DN
Deploy as a service

Keep the index fresh

Ship the indexer on a systemd timer (Linux) or launchd (macOS) so the DB tracks your vault. See systemd/ and docs/setup-guide.md for unit files and the macOS alternative.

Explore the configurator → Read the usage guides