project-brain logoproject-brain

v1.1.0

project-brain

A CLI-first developer intelligence tool for analyzing codebases, tracking Git changes at function level, generating structured exports for AI systems, and explaining code changes — running entirely on your machine.

30-Second Quick Start

pip install project-brain-cli

brain project init          # create .brain/ + brain.yaml
brain project analyze .     # scan repo → .brain/data.json
brain diff show             # HEAD~1 → HEAD function-level diff
brain export full_code      # pack repo → .brain/exports/full_code.txt

Command Map

CommandWhat it does
brain project initInitialize project-brain in the current directory
brain project analyzeAnalyze repository structure using AST parsing.
brain project summarySummarize the analyzed data
brain project doctorRepository diagnostics and environment health checks.
brain diff showShow semantic git differences between references.
brain diff reviewExplain code changes using LLM
brain diff explainExplain a file or function
brain export full-codeExport entire codebase into structured file
brain export fileManually add a single file to export
brain export dirManually add a directory to export
brain export code-changesExport changed code between two git references
brain testllm testTest configured LLM provider connectivity.

Requirements

  • Python >= 3.10
  • Git installed and accessible in PATH
  • Optional: Ollama / OpenAI / Gemini / HuggingFace for LLM features

Note

Both brain and project-brain aliases are registered after install.