Your code says what.
Write down why.
Your AI agent relearns your codebase every session. SourceBrain captures the why once, syncs it to the cloud, and hands it back over MCP, so every future session on any machine already knows it. Nothing relearned, nothing lost.
That one line installs the CLI. No account needed for local mode. Free for solo use, no credit card.
Works with
Features
What SourceBrain does
A handful of focused features that keep a knowledge base from rotting into another stale wiki nobody trusts. Pick one to see it run.
Connect Claude or Cursor over MCP and your agent searches, reads, and writes lessons as it works, answering from your team's knowledge and citing the lesson it used. No MCP? Pipe a bundle into any chat with sourcebrain context.
So, what actually leaves your machine?
Your source code stays on your machine.
Every command SourceBrain ships, and exactly what it puts on the wire. Your code sits on your side of the boundary, except the one slice you point at yourself. Pick a command and watch it.
Your source code
Never leaves your machine. It stops at the boundary.
- The lesson prose you wroteCrosses
- Anchors: file path, symbol, line rangeCrosses
An anchor is a pointer, not a copy. It says auth/token.go:40, it does not carry line 40 with it. To power semantic search, the server embeds the lesson text itself, so your prose reaches an embeddings provider. Your code does not.
See versioned syncIn your editor
The “why” shows up next to the code
The SourceBrain extension for VS Code surfaces the lessons anchored to a file, symbol, or line range, right where you're reading the code. No tab-switching to go look it up.
- Gutter markers on every line that has a lesson anchored to it
- Hover to read the lesson inline, with a link to open the full thing
- Select code → right-click to capture a lesson anchored to those exact lines
Build from the repo today (editor/vscode, launch with F5). Marketplace & Open VSX listing coming.
Hover the dotted line, or drag to select code and capture a lesson.
Knowledge graph
See how your knowledge connects
Link lessons with [[wikilinks]] and SourceBrain turns them into a map you can explore: no commands, no git. Click a node to open the lesson, follow backlinks to related context, and spot the gaps at a glance.
- Backlinks: every lesson that points here, in one place
- Orphan detection: find lessons nothing links to
- Broken links surfaced as dashed-red nodes
Drag a node to move it, or click one to open its lesson.
Why not a wiki?
You've written things down before
The problem was never the writing. It's that nothing kept what you wrote true, close to the code, or visible to the tools doing the work.
| WikiREADME / wiki | NotionNotion / Confluence | SourceBrain | |
|---|---|---|---|
| Versioned with your code | |||
| Anchored to real files & symbols | |||
| Flagged when the code drifts | |||
| Served to your AI over MCP | |||
| Lives in your repo |
Who it's for
One knowledge base, three doors in
The “why” behind a product lives with everyone: product, support, ops, design. Every role gets its own way into the same source of truth, and nobody is forced through a terminal.
Engineers
CLI · VS CodeCapture and read lessons from the CLI and the editor extension, right next to the code they explain.
See it in the editor demo
AI agents
MCPRead and write lessons over MCP, cite them in answers, and get warned when one has gone stale.
See it in the AI tools demo
Everyone else
Web appPMs, support, and new hires search, read, and explore the graph in the browser. No terminal, no git.
See it in the knowledge graph
Pricing
Simple pricing
Start free. Upgrade when your team grows.
Free
Solo & small projects
- Full CLI & VS Code extension
- MCP / AI integration
- Version history & stale checks
- Teams, plans, roles & approval
- Personal "My Lessons" (3 free)
Pro
Growing teams
- Everything in Free, plus:
- Semantic search + relevance
- AI drafts, answers & codebase scan
- Organizations & shared context
- Drift & conflict detection
Enterprise
Large orgs
- Everything in Pro, plus:
- Self-hosted server option
- Onboarding & migration help
- Dedicated support
FAQ
Common questions
Do I need an account to use SourceBrain?
No. Local mode runs fully offline with no signup: lessons live in a .sourcebrain/ folder inside your repo, just like a .git/ directory. You only need an account for cloud workspaces and team features.
What happens when I hit the Free plan's lesson limit?
Nothing breaks. Every lesson you already have stays readable and editable, and version history keeps working. You just can't add new lessons to that workspace until you upgrade. Local mode is unlimited on every plan.
Can I start local and move to the cloud later?
Yes. sourcebrain push uploads your local lessons to a cloud workspace, and sourcebrain pull brings cloud changes back down. If the same lesson changed in both places, you get a side-by-side diff and choose what to keep.
Does SourceBrain send my code to an AI?
Not unless you ask it to. Local mode never phones home. The optional AI features send only the exact files you pick, only when you run them, and everything they draft is yours to review before it is saved.
We have many repos. Do we need a workspace per repo, with separate member lists?
One workspace per repo is the normal setup, and on Pro you can group them in an organization: one member list covers every org-visible workspace, so onboarding someone is one invite instead of N. An org can also designate a shared conventions workspace whose lessons join search and AI answers in every repo's workspace, and lessons can link across workspaces with [[ws:workspace/path]].
Can I self-host SourceBrain?
Yes. The Enterprise plan includes the full server stack, deployed on your own infrastructure with Docker Compose. The CLI works the same against a self-hosted server as against the hosted version.
Is SourceBrain open source?
The client is source-available on GitHub: the sourcebrain CLI and the VS Code extension, so you can inspect exactly what runs on your machine. It ships under the Functional Source License, which becomes Apache 2.0 after two years. The hosted service (server, billing, and the AI integration) stays closed.
Write down the first thing you wish someone had told you
Free to start, no credit card. Install the CLI, run sourcebrain init, and capture that one gotcha this repo keeps teaching the hard way.
Create your workspace →