CLI
Code Review
Get AI-powered reviews of your git changes
Code Review
The melious diff command sends your git changes to an AI model for code review. It analyzes diffs for bugs, security issues, performance problems, and style improvements.
Usage
Review Unstaged Changes
melious diffReview Staged Changes
melious diff --stagedCompare Branches
melious diff main..featureReview a Specific Commit
melious diff abc1234Focus Areas
Narrow the review to specific concerns:
melious diff --focus bug,securityAvailable focus areas:
| Focus | What it looks for |
|---|---|
bug | Logic errors, off-by-ones, null references |
security | Injection, auth issues, data exposure |
performance | Inefficient queries, unnecessary allocations |
style | Naming, formatting, code clarity |
Combine multiple areas:
melious diff --staged --focus bug,performanceParameters
| Flag | Type | Default | Description |
|---|---|---|---|
--staged | bool | false | Review staged changes instead of unstaged |
--model | string | from config | Model override (default: diff.model config) |
--preset | string | from config | Routing preset (balanced, speed, price, eco) |
--context | int | 30 | Lines of context around each hunk |
--focus | string[] | — | Focus areas: bug, security, performance, style |
--raw | bool | false | Raw AI response without formatting |
The default model for code reviews is configured separately from chat at diff.model (default: qwen3-coder-480b-a35b-instruct). Change it with:
melious config set diff.model deepseek-v3.2Large Diffs
If your diff exceeds ~50KB, the CLI displays a warning with the size and file count. On an interactive terminal, it asks for confirmation before sending the large diff to the API.
Example Workflow
Stage your changes, review, then commit:
git add -p
melious diff --staged --focus bug,security
git commit -m "feat: add user validation"