repobrain index¶
Index a repository for codebase intelligence.
Usage¶
PATH defaults to the current directory.
Options¶
| Option | Default | Description |
|---|---|---|
--full |
— | Force full re-index (default on first run) |
--incremental |
— | Only process changed files since last index |
--max-commits N |
10000 | Override commit history depth |
--concurrency N |
5 | Override generation concurrency |
--no-docs |
— | Skip doc generation (faster, no LLM calls) |
--language LANG |
all | Restrict to a specific language |
Pipeline Stages¶
- Discovery — walk repo, detect languages, write file manifest to SQL
- Parse — tree-sitter parsing in
ProcessPoolExecutor(CPU-bound) - Graph Build — async as ParseResults stream in (concurrent with Stage 4)
- Git Analysis — commit history, ownership, co-change patterns
- Embedding —
ThreadPoolExecutor+ semaphore-limited batch embedding - RAG Doc Generation — dependency docs fetched from LanceDB FIRST, then LLM called
- Atomic Commit — per-file
coordinator.transaction()— rolls back all 3 stores on failure