RexCode logo
⛏️

Lode finds the code.
Vein remembers the why.

Your AI starts every session from zero. Vein fixes that.

Every time you start a new AI session, you pay the re-orient tax — re-explaining decisions, re-discovering workarounds, re-loading context. Vein stores that knowledge once, in .vein/, and any AI can pull it instantly.

Open Source · rex4ssd/vein
1 cmd
to capture a decision
< 2K
tokens to brief any AI
0 cloud
plain markdown, local-first
∞ AI
Claude · Gemini · GPT · Cursor

The Problem

Your LLM reads code. It cannot read your mind.

  • Why did you add that workaround on line 142?
  • Why did you drop SQLite in week 3?
  • Which random seed reproduces the race condition?

That knowledge lives in your head, a Slack thread, or nowhere. Vein gives it a home.

How it works

vein logCapture in one line

No editor. No template. One command, one line of context. Three entry types, zero friction.

vein log decision "drop SQLite for Parquet — single-writer constraint failed" vein log lore "API returns 200 not 429 on rate-limit — see client.rs:142" vein log pitfall "never call hal_dma_submit from within a callback — re-entrant hell"

vein recallFull-text + semantic search

No grep. No archaeology. Type what you remember, get the decision back. Works offline via FTS5. Add local Ollama for semantic search.

vein recall "sqlite" # → the Parquet decision vein recall "rate limit api" # → the 200-not-429 lore entry vein recall "DMA callback" # → the pitfall + the why

vein brief30-second AI session primer

Outputs ≤ 2K tokens: top decisions, active pitfalls, recent lore. Paste into any AI session. Oriented in seconds, not minutes.

vein brief → ~800-token session primer → top 5 decisions · 3 active pitfalls · recent lore → paste into Claude / Gemini / Cursor / any AI

vein askNatural language Q&A

Query your .vein/ archive in plain English. Works with local Ollama or any connected MCP client.

vein ask "why does the DMA API use callbacks?" → Found: decisions/20260515_dma_callback.md SystemC model is sc_event-driven; polling busy-waits in HOST build.

vein importBring in existing docs

Already have ADRs, changelogs, or design docs? Import them and they become searchable alongside new entries.

vein import docs/adr/ vein import CHANGELOG.md

The .vein/ directory

Sits next to .git/. Committed to git. Clone the repo, get the memory.

.vein/ decisions/ # architectural choices, why A over B lore/ # API quirks, workarounds, "don't refactor this" pitfalls/ # things that went wrong and how to avoid them references/ # links to ADRs, issues, RFCs

Plain markdown + YAML frontmatter. Any editor can read it. Any AI can consume it. No proprietary format.

How Lode + Vein work together

Vein workflow diagrams — Lode+Vein collaboration and AI session loop

Key properties

PropertyDetail
🏠 Local-firstAll data stays on your machine. No cloud sync required.
🌿 Git-native.vein/ committed to the repo. Clone = get the memory.
🤖 AI-agnosticWorks with Claude, Gemini, ChatGPT, Cursor, any MCP client.
📡 Offline capableFTS5 recall works without network or Ollama.
🔒 Zero telemetryNo analytics, no phoning home.
📄 Plain textFuture-proof. Readable by humans and tools for decades.

vs. Alternatives

Capability VeinAI Memory git logADR toolsNote RAG
Stores why decisions were made⚠️⚠️
Works across AI tools⚠️
One-command capture⚠️
Lives with the repo
No cloud required⚠️

⚠️ = partial. AI Memory is complementary — use both. It stores user preferences; Vein stores project decisions.

Who it's for

Solo developersSwitching between long-running projects who lose thread between AI sessions.
AI-heavy workflowsIf you're burning tokens re-explaining context every session, Vein pays for itself in 10 minutes.
Small teamsWhere domain knowledge concentrates in one person and turnover is painful.
HW / FW engineersWorking across simulation and real silicon — behavior differences that are critical and underdocumented.

🔌 MCP Server — coming in Phase 0.3
Any MCP client (Claude Desktop, Cursor, Cline) will be able to query your .vein/ directly as a tool call — no copy-paste, no manual briefs.

Vein is in early access

CLI in active development. Watch the repo to follow along.

Part of the Lode Vein suite · rexcode.app