Code review
Run a model over a git diff and get review notes back — bugs, security issues, performance problems, style. Not a replacement for human eyes, but the pass you run before you ask for those eyes, to catch the obvious stuff.
By default it reads your unstaged changes in the current repo. You can point it at staged changes, a branch comparison, or a specific commit.
What to review
Unstaged changes
melious diffStaged changes
melious diff --stagedA branch or commit range
melious diff main..featureA specific commit
melious diff abc1234Narrowing the focus
Tell the model what you care about. Useful when a full review would be noise:
melious diff --focus bug,security| 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, clarity |
Combine areas:
melious diff --staged --focus bug,performanceFlags
| Flag | Type | Default | Description |
|---|---|---|---|
--staged | bool | false | Review staged changes instead of unstaged |
--model | string | from config | Override the review model (default: diff.model) |
--preset | string | from config | Routing flavor. See Routing. |
--context | int | 30 | Lines of context around each hunk |
--focus | string[] | — | Areas to focus on: bug, security, performance, style |
--raw | bool | false | Print the model's response with no formatting |
diff.model is a separate setting from the chat model — coding-tuned models are worth the extra cost on review but overkill for most chat. Change it with melious config set diff.model <model>.
Large diffs
Over roughly 50 KB, we warn you with the size and the file count, and — on an interactive terminal — ask before sending. A 1 MB diff is almost always going to produce a worse review than cutting the change up, and it costs more.
A workflow
Stage changes, review what's staged, then commit:
git add -p
melious diff --staged --focus bug,security
git commit -m "feat: add user validation"Chat and prompts
The fast path: one prompt, one response, streamed to your terminal. Also drops into interactive chat when you leave the prompt off, accepts stdin for pipelines, and can pull files into the message for context.
Image generation
Turn a prompt into a file on disk — and, on a capable terminal, an image drawn inline right after the command.