project-brain logoproject-brain

diff

brain diff review

Explain code changes using LLM

Stability:stable
Introduced:0.3.0

Syntax

brain diff review [options]

Parameters

ArgumentTypeDescription
from_refstrStarting git reference
to_refstrEnding git reference

Demo

brain diff review
brain diff review

Prerequisites

  • brain testllm test

Consumes

📥 git history

Produces

📤 .brain/reports/*.json📤 .brain/reports/*.html

Examples

brain diff review
brain diff review HEAD~1 HEAD

Workflow

  1. 1
    brain diff show
  2. 2
    brain diff review

Errors & Failures

  • ⚠️INVALID_GIT_REF
  • ⚠️LLM_PROVIDER_FAILURE

Use Cases

  • AI Code Review
  • Pull Request Review
  • Code Change Explanation

Target Personas

👤 developer👤 reviewer👤 tech lead

Notes

  • Uses configured LLM provider to explain changes.

Edge Cases

  • Large diffs may increase LLM response time.

Related Commands

brain diff showbrain export code-changes