project-brain logoproject-brain

Getting Started

Quick Start

From zero to a working semantic analysis in under 30 seconds.

Step 1 — Install

pip install project-brain-cli

Step 2 — Initialize

Run this inside any existing Git repository:

brain project init

Creates .brain/, .brain/cache/, .brain/data.json, .brain/index.json, and brain.yaml. Safe to re-run.

Step 3 — Analyze

brain project analyze .

Recursively scans the repo, parses Python ASTs, extracts functions + classes, writes results to .brain/data.json.

Step 4 — Inspect changes

brain diff show

Defaults to HEAD~1 → HEAD. Shows modified / added / deleted files plus function-level changes inside Python files.

Step 5 — Export for LLM

brain export full_code

Packs the repo into .brain/exports/full_code.txt — ready to paste into any LLM prompt.

Step 6 — Validate environment

brain project doctor

Tip

Run brain project doctor any time something is not working. It checks project init, Git, config, and provider setup and gives you a clear READY / PARTIAL / NOT READY status.