Show HN: Scribe, a CLI that builds AI agent memory from your repos and sessions Scribe, a new open-source CLI tool, automatically builds a cross-project knowledge base for AI coding agents by mining git history, Claude Code and Codex sessions, and self-sent URLs, writing a curated markdown wiki that agents query before acting. It runs entirely locally on Ollama with zero API spend, auto-commits hourly, and supports typed entity relationships to compound knowledge across projects. Context-aware agents scribe init writes a handshake block into both ~/.claude/CLAUDE.md and ~/.codex/AGENTS.md , so every session in every project queries your KB before recommending a library or proposing an architecture. scribe reads your git history, your Claude Code & Codex sessions, and self-sent URLs, then writes the wiki for you — so the next agent session already knows what you decided and why. It’s memory your agents read before they act, not a second brain you maintain and never reopen: plain markdown in git, cross-project, cron-driven, and able to run 100% locally on Ollama for zero API spend. brew install oliver-kriska/scribe/scribe scribe mines four input streams, filters out the noise before any LLM touches it, then fans dense sources into entity-first wiki pages. Every step runs on cron; set it up once and forget it. Git repos, Claude Code & Codex sessions, URLs you text yourself, and drop files from other projects. scribe auto-discovers every codebase you've ever opened in either CLI and keeps the manifest fresh. Keyword-density scoring rejects boilerplate sessions before any LLM call, so cheap sessions cost nothing. Survivors go through a two-pass absorb: pass 1 grounds atomic facts, pass 2 fans dense sources into multiple entity-first wiki pages. Auto-generated wikilinks, backlinks JSON, and retrieval-context paragraphs spliced into every article so embeddings catch implicit entities. qmd reindexes for semantic search, reachable from any terminal, in any directory, or from inside Claude Code via MCP. scribe isn't RAG, it isn't Obsidian, and it isn't another LLM-on-every-session burner. It sits between them: watches your work, writes the notes for you, and compounds knowledge across every project you touch. scribe init writes a handshake block into both ~/.claude/CLAUDE.md and ~/.codex/AGENTS.md , so every session in every project queries your KB before recommending a library or proposing an architecture. Hourly auto-commits. Every 2 hours: project extraction. 3×/day: session mining. Every 30 minutes: queued URLs. Every 4 hours: self-iMessaged links. Sundays at 02:00: the full Dream consolidation, with a lighter hot-domain pass daily in between. One cross-project KB, not siloed per repo. Solve the oban idempotency bug in project A on Monday; the agent finds your fix on Friday when the same shape comes up in project B. Per-project extraction, two-pass absorb, Dream cycle, assess, deep, session-mine, relations migrate: every LLM op runs end-to-end against a local Ollama server. One line in scribe.yaml flips the whole pipeline. Zero API spend. File over app: the corpus has to outlive the pipeline. A git repo of plain markdown with YAML frontmatter. Push to your own GitHub, Gitea, or Forgejo; open in Obsidian, VS Code, vim, or mdbook. No SaaS, no vendor lock-in. Articles connect via a closed 10-kind typed-edge schema: supersedes , contradicts , derived from , specializes , extends , and five more. scribe relations migrate classifies existing related: links into it with an LLM. The whole surface, in numbers — every figure is checkable against scribe --help and scribe.yaml , not marketing. Local mode needs no key at all; the default Anthropic path signs in through your claude -p CLI, not an API key. scribe is a compiled knowledge base, not a vector database : it auto-writes a curated markdown wiki your agents query with BM25, so there's nothing to embed and nothing to host. The "second brain" debate is about notes you read. scribe isn't that. It's memory your agent reads before it decides: the reasons behind a choice, not summaries you'll never reopen. It sits between manual-notes tools Obsidian, Notion and unbounded LLM-on-every-query approaches vanilla RAG, claude-memory-compiler : a curated wiki on top of raw sources kept verbatim, small enough for an agent to read whole, and cheap to query because most lookups are plain-text matches, not vector guesses. | Capability | scribe | RAGLangChain · LlamaIndex | Code Insights@code-insights/cli | AnythingLLM | Obsidian | |---|---|---|---|---|---| | Auto-written from your dev work | Yes | You index docs | Yes | You upload docs | You type notes | | Sources captured | Sessions + git + URLs | Docs you feed | Coding sessions only | Docs you upload | Notes you write | | Output is portable markdown in git | Yes | Vector chunks | SQLite dashboard | Vector store | Yes | | Vector DB required? | Not needed | Required | Not needed | Required | Not needed | | Full-text BM25 search | qmd · FTS5 | Vector recall only | Dashboard analytics | Vector chat | Yes | | Agents read it back before deciding | CLAUDE.md / AGENTS.md | If you wire it | Human dashboard | You chat with it | No | | Local-first, no API key Ollama | 100% Ollama | Local embeddings | Ollama option | Local LLM + DB | AI add-ons need keys | | Tool | Session mining | Cron-driven | Density pre-filter | Two-pass absorb | Multi-project | Local-mode | |---|---|---|---|---|---|---| | scribecurated wiki + raw sources, in git | Claude + Codex | launchd / systemd | BM25 | atomic facts → pass-2 | manifest-tracked | 100% Ollama | | claude-memory-compilerAnthropic-only, single project | Claude only · $115 / 20min · issue 3 | manual | none | single-pass | single repo | API only | | nvk/llm-wikiLLM-built wiki, no mining | user-fed | manual | none | single-pass | single repo | Ollama possible | | basic-memoryMCP memory server | issue 669 since Mar | request-driven | none | single-pass | per-MCP-client | local embeddings | | RAG LangChain, LlamaIndex retrieve-then-prompt | retrieves chunks | on-query | vector recall | no absorb | per-index | local embeddings | | Obsidian / Notionmanual notes tool | you type it | manual | tag-based | no absorb | vault / workspace | Obsidian = local, Notion = cloud | scribe is the wiki the LLM writes for you, sitting on top of raw sources kept verbatim. RAG retrieves chunks; scribe gives you a curated, named-entity wiki you can also grep. — project README scribe is single-user by default and stays that way. But a small team on the same codebases can point every machine at one git-backed KB. The obvious fear with sharing agent sessions — a leaked secret, a private client repo, one teammate's config change reaching everyone — is exactly what the gates below are built to stop. Only knowledge you meant to keep crosses into the shared KB. A trust layer pins the sensitive surface of a shared scribe.yaml : provider, model, ingest paths, and the secret scanner itself. A pushed change that would repoint inference to a new endpoint or drain a new directory into the KB reverts to the last trusted snapshot until a human approves it. scribe mines session transcripts, which routinely carry API keys and tokens. In team mode a deterministic secret scanner runs in the commit gate and holds flagged credentials back before anything lands in shared git history. No LLM, no network: a regex pass on the commit path. Every scribe sync pulls, merges, and reindexes before it extracts, and a committed ledger keeps two machines from mining the same git revision twice. Your inference bill scales with commits, not with the number of laptops pointed at the KB. Discovered projects start pending. allowed remotes and source filters gate discovery by git-remote identity, and scribe projects {list,approve,ignore,review} controls what enters the pipeline, so a side project or a client checkout never lands in the shared KB without an approve. scribe promote