🧠 RepoBrain (formerly Antigravity) — Give your repo a brain. ChatGPT for your codebase: works in Claude Code, Cursor, Codex, Windsurf & more.
> /plugin marketplace add study8677/repobrain> /plugin install repobrain@repobrain
What's inside
Formerly known as Antigravity Workspace Template — same project, new name.
# 1 — Install (Claude Code plugin marketplace)
/plugin marketplace add study8677/repobrain
/plugin install repobrain@repobrain
# 2 — Configure a backend (logged-in local CLI = no key, or paste an API key), build the knowledge base
/repobrain:rb-setup
/repobrain:rb-refresh
# 3 — Ask anything, grounded in real code with file paths + line numbers
/repobrain:rb-ask "How does auth work?"
95.83% weighted semantic accuracy · 4.04× faster scored queries than CodeGraph + Trae on the main track. Benchmark results ↓ Codex CLI users — drop the
repobrain:prefix; the same four slash commands ship there too.
Already in a logged-in AI IDE (Trae / Cursor / Claude Code / Codex)? Don't touch pip or an API key — paste this one line to your AI assistant and it does the rest (detects your logged-in CLI, wires up a zero-key backend, initializes the project, self-tests):
Read https://github.com/study8677/repobrain/blob/main/AI_INSTALL.md and follow it to install RepoBrain in this project.
Then just ask your AI anything about your codebase.
Cross-IDE repository knowledge engine for grounded codebase Q&A. Same .repobrain/ knowledge layer reads in every IDE; one engine, every host.
An AI Agent's capability ceiling = the quality of context it can read.
rb-refresh deploys a multi-agent cluster that autonomously reads your code — each module gets its own Agent that generates a knowledge doc. rb-ask routes questions to the right Agent, grounded in real code with file paths and line numbers.
Instead of handing Claude Code / Codex a repo-wide grep and making it hunt on its own, give it a ChatGPT for your repository.
Traditional approach: RepoBrain approach:
CLAUDE.md = 5000 lines of docs Claude Code calls ask_project("how does auth work?")
Agent reads it all, forgets most Router → ModuleAgent reads actual source, returns exact answer
Hallucination rate stays high Grounded in real code, file paths, and git history
| Problem | Without RepoBrain | With RepoBrain |
|---|---|---|
| Agent forgets coding style | Repeats the same corrections | Reads .repobrain/conventions.md — gets it right the first time |
| Onboarding a new codebase | Agent guesses at architecture | rb-refresh → ModuleAgents self-learn each module |
| Switching between IDEs | Different rules everywhere | One .repobrain/ folder — every IDE reads it |
| Asking "how does X work?" | Agent reads random files | ask_project MCP → Router routes to the responsible ModuleAgent |
Architecture is files + a live Q&A engine, not plugins. Portable across any IDE, any LLM, zero vendor lock-in.
Flask, ripgrep, Vite, Prometheus · 20 questions × 3 repeats per product · same source access and model route (Seed-2.1-Turbo → seed-code-pro).
| Main-track metric | RepoBrain | CodeGraph + Trae |
|---|---|---|
| Weighted semantic accuracy | 95.83% | 84.17% |
| Successful queries | 60/60 | 53/60 |
| Scored query time | 5,106.67 s | 20,621.14 s |
| Query tokens | 22,326,315 | 86,027,974 |
| Cold build time | 7,420.63 s | 9.58 s |
| Cold build + scored queries | 12,527.30 s | 20,630.72 s |
Failures count as incorrect. Cold builds compare full AI knowledge generation with static code-graph indexing, not equivalent workloads. Results apply to this locked experiment only.
Plugin install for Claude Code / Codex CLI (recommended — the rb CLI and engine auto-install together on Claude's first session):
# Claude Code
/plugin marketplace add study8677/repobrain
/plugin install repobrain@repobrain
/repobrain:rb-setup # interactive: use a logged-in local CLI (Codex/Trae/Claude, no key) or paste an API key; writes .env
/repobrain:rb-refresh # first refresh auto-creates .repobrain/
/repobrain:rb-ask "How does this project work?"
# Codex CLI (manual engine install — Codex hooks are not yet supported)
pipx install "git+https://github.com/study8677/repobrain.git#subdirectory=engine"
pipx inject --force --include-apps repobrain-engine "git+https://github.com/study8677/repobrain.git#subdirectory=cli"
codex plugin marketplace add study8677/repobrain
/rb-setup
/rb-refresh
/rb-ask "How does this project work?"
Codex auto-discovers slash commands from the plugin's commands/ directory, so the same four commands work without the repobrain: namespace prefix. The raw CLI calls (rb-refresh --workspace ., rb-ask "..." --workspace .) also still work. If your Codex build supports MCP, register rb-mcp --workspace <project> separately.
# 1. Install engine + CLI
pip install "git+https://github.com/study8677/repobrain.git#subdirectory=cli"
pip install "git+https://github.com/study8677/repobrain.git#subdirectory=engine"
# 2. Configure .env with any OpenAI-compatible API key
cd my-project
cat > .env <<EOF
OPENAI_BASE_URL=https://your-endpoint/v1
OPENAI_API_KEY=your-key
OPENAI_MODEL=your-model
RB_ASK_TIMEOUT_SECONDS=120
EOF
# 3. Build knowledge base (ModuleAgents self-learn each module)
rb-refresh --workspace .
# 4. Ask anything
rb-ask "How does auth work in this project?"
# 5. (Optional) Register as MCP server for Claude Code
claude mcp add repobrain rb-mcp -- --workspace $(pwd)
pip install git+https://github.com/study8677/repobrain.git#subdirectory=cli
rb init my-project && cd my-project
# IDE entry files bootstrap into AGENTS.md; dynamic knowledge is in .repobrain/
See INSTALL.md for full install details, verification commands such as rb doctor, and troubleshooting notes for PATH, MCP, and host-specific plugin behavior.
Same four slash commands ship to both Claude Code and Codex CLI. Claude namespaces them as /repobrain:<name>; Codex auto-discovers commands/ and surfaces the bare /<name> form. No retraining — same flow on both hosts.
| Claude Code | Codex CLI | Purpose |
|---|---|---|
/repobrain:rb-setup | /rb-setup | First-time setup — pick LLM provider, write .env |
/repobrain:rb-refresh [quick] | /rb-refresh [quick] | Build a full baseline or manually update only affected Agent groups |
/repobrain:rb-ask <question> | /rb-ask <question> | Routed Q&A on the current codebase |
/repobrain:rb-init <name> | /rb-init <name> | Scaffold a new multi-agent repo from this template |
A typical first session is rb-setup → rb-refresh → rb-ask.
If installation or provider setup looks wrong, run rb doctor --workspace ..
rb-setup — first-time configurationRun this once per project, right after installing the plugin. Interactive picker that first detects the headless CLIs you're already logged into (Codex / Trae / Claude / Gemini) and offers a no-API-key local host-runner as the most convenient option — no key to paste, RepoBrain just drives your existing CLI login for both rb-ask and rb-refresh. If you'd rather use a hosted model, it also offers the API-key providers (OpenAI / DeepSeek / Groq / 阿里灵积 / NVIDIA NIM / Ollama local / any OpenAI-compatible endpoint). Either way it writes .env to the project root — RB_HOST_RUNNER + RB_HOST_COMMAND for a local CLI, or OPENAI_BASE_URL / OPENAI_API_KEY / OPENAI_MODEL for a provider — and ensures .env is in .gitignore. Skip it if you already have a working .env.
rb-refresh — build / refresh the knowledge baseDeploys the multi-agent cluster and creates an atomic generation baseline. The
first run must be a full refresh. Later, quick compares committed changes from
the active generation to HEAD, requires a clean worktree, and lets RepoBrain's
ImpactPlanner plus an independent Verifier execute only affected Agent groups.
It never falls back to a full refresh. Use failed-only to resume failed or
pending groups for the same target commit. rb-ask only warns about new commits;
it never refreshes knowledge automatically.
Time: a few minutes for small repos, longer for large ones. Requires rb-setup to have completed. Works with either backend: an API-key/OpenAI-compatible provider runs the full LLM refresh, while a local host-runner (Codex / Trae / Claude / …) runs the tool-free stages (module docs, map.md) through your logged-in CLI and automatically degrades the tool/handoff stages (conventions, git insights) to deterministic output — no API key needed. Add RB_REFRESH_SCAN_ONLY=1 only if you want a fast structure-only index with no LLM narration at all.
rb-ask — routed Q&A on the codebaseFAQ
repobrain is a Claude Code plugin with 4 hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. It includes agent-repo-init, graph-retrieval, knowledge-layer. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it