Transform your Obsidian markdown vault into a queryable SQLite database while preserving its graph structure (wikilinks, backlinks, and unresolved concepts).
Obsidian's "Bases" feature requires manual organization. This tool treats your vault as a document-graph hybrid:
- Notes = Nodes (with frontmatter properties)
- Wikilinks = Edges (bidirectional, typed)
- Unresolved links = Semantic concepts waiting to be documented
Write naturally in Obsidian. Query instantly via SQL.
- Incremental Sync: Only re-indexes changed files (hash + mtime tracking)
- Graph Semantics: Traverse
[[wikilinks]]as SQL relationships - Unresolved Concepts: Tracks missing notes by reference count (your writing backlog)
- FTS5 Search: Full-text search with ranking, booleans, and prefix matching
- Zero Lock-in: Your markdown files remain the source of truth; delete
vault.dbanytime
# 1. Index your vault
python index.py ~/Documents/ObsidianVault
# 2. Query with sqlite3 directly
sqlite3 vault.db "SELECT path FROM notes WHERE title LIKE '%LoRA%'"
# 3. Or use the included CLI helper
python query.py backlinks "lora_qlora_notes.md"
python query.py unresolved --limit 10See docs/SCHEMA.md for complete reference.
Core Tables:
notes: Markdown files (path, title, content, frontmatter)links: Graph edges with context (the sentence containing the link)properties: Flattened frontmatter key-valuesattachments: Non-markdown files (images, PDFs)notes_fts: Full-text search index (virtual table)
Requires Python 3.8+ (no dependencies, uses stdlib + SQLite).
git clone https://github.com/YOURUSERNAME/obsidian-vault-sql.git
cd obsidian-vault-sql
chmod +x index.py
./index.py ~/path/to/vault- Files are primary, database is cache
- Path-based linking (
folder/note.mdnot titles—titles can collide) - Unresolved links are data (not errors)
- Schema-stable: Core tables won't change; additions only
- Embedding support (vector similarity)
- WebDAV/S3 sync hooks
- Obsidian plugin (sync on save)
- Import
.basefile format