B2 · docs
GitHub ↗
Local-first Markdown vault · AI-native connection discovery

B2

A personal, local-first Markdown knowledge vault with an AI layer that surfaces the semantically nearest notes — for you to connect.

The Markdown stays plain and yours — B2 is the intelligence layer over your notes, not a container around them. This repository is the index engine + b2 CLI.

index = projection of ( Markdown )

Drop the index, rebuild it from your Markdown — and it comes back identical. The vault is the only source of truth; everything B2 derives is a disposable cache.

129 tests passing Rust · one static binary 3 crates · SQLite (FTS5 + sqlite-vec) status: index engine + CLI · connection discovery via b2 similar + b2 link

Quick start — set up and work with a vault →

A hands-on walkthrough: build the b2 CLI, point it at a folder of Markdown, and search, explore, and surface semantically similar notes to link by hand — from an empty checkout to a working vault in about ten minutes.

Read the system architecture →

The full build tour: the two storage tiers, the ingest / retrieval / similarity pipelines, the deterministic embedder seam, and the invariants that hold it together — every claim ground-truthed against the test suite.

Typed links, on your call

Not just "related." b2 similar surfaces the semantically nearest notes; you commit the ones worth keeping with b2 linksupersedes, elaborates, refutes — as typed frontmatter. You are the precision gate.

Your Markdown, untouched

Plain .md files, fully usable in Obsidian with no B2 running. B2's only writes are surgical and in frontmatter — it never authors your body.

Built for tomorrow's model

Every AI part sits behind a swappable seam, tested against a deterministic fake; a real local model drops in with no schema or flow change.

🚀 Quick start 📐 System architecture 🗂️ Indexing pipeline 🔗 Connection discovery Source on GitHub 📄 Design docs (planning/)