Melious
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 diff

Review Staged Changes

melious diff --staged

Compare Branches

melious diff main..feature

Review a Specific Commit

melious diff abc1234

Focus Areas

Narrow the review to specific concerns:

melious diff --focus bug,security

Available focus areas:

FocusWhat it looks for
bugLogic errors, off-by-ones, null references
securityInjection, auth issues, data exposure
performanceInefficient queries, unnecessary allocations
styleNaming, formatting, code clarity

Combine multiple areas:

melious diff --staged --focus bug,performance

Parameters

FlagTypeDefaultDescription
--stagedboolfalseReview staged changes instead of unstaged
--modelstringfrom configModel override (default: diff.model config)
--presetstringfrom configRouting preset (balanced, speed, price, eco)
--contextint30Lines of context around each hunk
--focusstring[]Focus areas: bug, security, performance, style
--rawboolfalseRaw 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.2

Large 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"

On this page