Amazon Q CLI for Code Review: Focus on What Changed, Not Everything

Amazon Q CLI for Code Review: Focus on What Changed, Not Everything

posted Originally published at dev.to 1 min read

Some AI-powered coding assistants already support code reviews, but most of them tend to review an entire workspace or just the currently open file. In real-world scenarios though, code reviews are often based on pull requests—where we only need to review changes between two branches, not the whole project. For example, reviewing just the differences between a hotfix branch and main.

That got me thinking: wouldn’t it be great if an AI coding assistant could handle that kind of focused review? At least as a first layer—giving us a detailed AI-generated review of the changes before we jump in manually. That way, human reviewers can just focus on refining things further instead of starting from scratch.

What I Built

One of Amazon Q Developer’s cool features is its CLI and MCP (Model Context Protocol) support. So I thought: why not use Amazon Q CLI to compare two branches—say, hotfix and main—and then have it go through the changed files one by one, review them, and finally compile the feedback into a single file using MCP as well? That way, whoever’s reviewing the PR can read the AI’s review first before doing their manual checks.

Demo

Youtube Demo

Code Repository

Code Review with Amazon Q Developer CLI

How I Used Amazon Q Developer

I used Amazon Q Developer as the first layer of code review—comparing one branch to another, like from hotfix to main. This helps make the review process smoother, more effective, and scalable—especially when combined with a follow-up manual review. What makes it even more exciting is that Amazon Q Developer can both generate code and review it too. Pretty handy, right?

If you read this far, tweet to the author to show them you care. Tweet a Thanks

Though this is not very indepth but really cool concept It feels much closer to how real teams actually work. how well does it handle nuanced feedback like code style or edge case detection? Would be awesome to hear how it performed in a larger PR.

I tried it earlier, and sometimes it misses a few edge cases—especially with larger PRs. One way we’ve been handling this is by running the Amazon Q CLI review multiple times, like 3 to 5 times, and then combining the insights from each run. That tends to give a more complete picture.

In theory, Amazon Q CLI should be capable of handling large-scale PRs well, especially since it’s officially partnered with GitHub and GitLab (if I’m not mistaken).

More Posts

The AI Awareness Gap: Living in the Tech Bubble While the World Catches Up

PriyaMoghe - Apr 9

Are you using generative AI correctly?

Elmer Urbina - Nov 24, 2024

Roo Code Workflow: Build a Free, Always-On LLM-Powered Dev Assistant

livecodelife - Jul 15

Useful Tools for LLM Application Development

Hirusha Fernado - Feb 20

Codex is Here to Slaughter Bad Code—And I’m Absolutely Here for It

Sourav Bandyopadhyay - May 25
chevron_left