Diff Commands
brain diff show
Shows Git changes between two refs at file level and function level. The core diff command.
brain diff show [from_ref] [to_ref]| Argument | Type | Default | Description |
|---|---|---|---|
from_ref | string | HEAD~1 | Source Git reference |
to_ref | string | HEAD | Target Git reference |
brain diff show

Visualizing semantic code changes at the function and file levels
Examples
brain diff show # HEAD~1 → HEAD (default)
brain diff show HEAD~5 HEAD # last 5 commits
brain diff show main feature/auth # branch comparison
brain diff show abc1234 def5678 # specific commit SHAsOutput
Files Changed: 3
── Modified Files ──
• src/api.py
• src/utils.py
── Added Files ──
• src/validators.py
── Deleted Files ──
• src/legacy.py
File: src/api.py
Functions Added: validate_user
Functions Removed: (none)
Functions Modified: create_user, delete_userNote
Function-level output only applies to Python files. Non-Python files receive file-level diff only. Mode can be changed to
file in brain.yaml: diff.mode: fileGit ref reference
| Ref | Meaning |
|---|---|
HEAD | Current commit |
HEAD~1 | Previous commit |
HEAD~5 | 5 commits before HEAD |
main | Branch tip |
abc1234 | Specific commit SHA |