vir
An LLM Wiki for Claude Code, in your Obsidian vault.
A command-line tool that reads your Claude Code session transcripts and distills reusable patterns, decisions, and gotchas into a searchable Obsidian knowledge vault so past sessions teach future sessions.
Vir is a command-line tool for developers who use Claude Code, Anthropic's AI coding assistant. Every Claude Code session produces transcripts stored as JSONL files on your computer, and those transcripts often contain useful patterns, decisions, and lessons. Vir reads those transcripts, filters them for meaningful content, and distills what it finds into structured notes inside an Obsidian knowledge vault. The goal is a feedback loop: past sessions teach future sessions.
The tool uses two AI models in sequence. A cheaper, faster model (Haiku) does an initial pass to classify sessions worth keeping. A more capable model (Sonnet) then extracts durable knowledge from the survivors, tagging it as a pattern, a decision, a gotcha, or a tool. Notes are cross-linked using Obsidian's wiki-link format. State lives in a local SQLite database so the tool never reprocesses the same session twice. An optional integration with Ollama, a local model runner, adds vector-based semantic search over the distilled notes. An MCP server exposes the vault to Claude Code so the AI can query your accumulated knowledge during future sessions.
Setup follows three commands: init (an interactive wizard that asks for your AI provider, vault location, and how often to run), run (a single processing pass), and schedule install (registers a background daemon that runs every three hours). On macOS the daemon uses launchd; on Linux it tries systemd first and falls back to cron. Windows is not yet supported.
The first run processes all historical sessions and typically costs between one and five dollars in API fees, depending on how many sessions you have. Each subsequent run costs around five cents. The README notes that using Kie.ai as the API provider instead of Anthropic directly cuts costs by roughly 72 percent while using the same underlying models.
The author ran the tool against 226 of their own sessions on the first night and extracted 126 notes: 54 patterns, 47 decisions, 23 gotchas, and 2 tool notes. The project is MIT-licensed and available on npm as @djolex999/vir-cli.
Where it fits
- Process all past Claude Code session transcripts into a structured Obsidian vault of patterns and decisions you can search later
- Set up a background daemon that runs every three hours and adds new Claude Code session insights to your vault automatically
- Expose your accumulated knowledge to future Claude Code sessions via an MCP server so the AI can query it during work
- Cut enrichment API costs by routing vir through Kie.ai instead of Anthropic directly while keeping the same underlying models