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 initCreate .brain/ directory and brain.yaml config
brain project analyze [path]Recursive AST scan → .brain/data.json
brain project summaryShow file/function/class counts and architecture hints
brain project doctorValidate environment (Git, config, provider, API keys)
brain diff show [from] [to]Function-level diff between Git refs (default HEAD~1→HEAD)
brain diff review [from] [to]LLM semantic diff explanation → HTML + JSON reports
brain diff explain <target>Explain a file or function (src/api.py:create_user)
brain export full_codePack entire repo → .brain/exports/full_code.txt
brain export file <path>Add single file to export
brain export dir <path>Add directory to export
brain export code_changes A BExport changed functions between two Git refs
brain testllm testTest LLM provider connectivity
brain communityShow GitHub, PyPI, Discussions links
brain --version / -vPrint installed version
brain --feedbackOpen GitHub Discussions in browser

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.