RepoBrain builds a shared .repobrain knowledge layer in your project so agents and IDEs answer questions about the code with file and line references.
Overview
RepoBrain is a cross-IDE repository knowledge engine for grounded codebase Q&A. It helps you understand an unfamiliar tree, trace implementations, and ask questions that return answers tied to real source locations.
Project knowledge lives under .repobrain and is meant to be read consistently across supported hosts. The rb-refresh command deploys agents that read the code and write module knowledge documents; rb-ask routes questions to the right context with evidence from the existing base. Knowledge updates are staged so a failed refresh leaves the prior generation usable.
It integrates natively with Claude Code and Codex CLI via slash commands, and connects to Cursor, Windsurf, Gemini CLI, VS Code with Copilot, Cline, Aider, and others through shared files, CLI output, or optional MCP. Setup expects Python 3.10+, Git with at least one commit, and a clean worktree before refresh, with either a logged-in headless CLI or an OpenAI-compatible API as the model backend.
Compared to wide repo search alone, the design centers on module agents, conventions files, and an ask-project MCP router so coding agents start from structured project context rather than ad hoc grepping.
Key features
- Shared .repobrain knowledge per project
- rb-refresh module knowledge generation
- rb-ask answers with source evidence
- MCP and CLI for multiple IDEs
- Incremental updates after commits
- Multi-agent module documentation
Use cases
- Onboarding to a new codebase
- Tracing API implementation and callers
- Keeping style rules visible to agents
- Same context when switching IDEs