<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Uzain Ahmed</title>
    <description>The latest articles on DEV Community by Uzain Ahmed (@uzainahmed).</description>
    <link>https://dev.to/uzainahmed</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4161207%2F615e7298-a76a-4d82-a35e-0b202b0b2812.jpg</url>
      <title>DEV Community: Uzain Ahmed</title>
      <link>https://dev.to/uzainahmed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/uzainahmed"/>
    <language>en</language>
    <item>
      <title>diff-review: a local pre-push code reviewer built for a friend</title>
      <dc:creator>Uzain Ahmed</dc:creator>
      <pubDate>Sun, 04 Oct 2026 17:55:53 +0000</pubDate>
      <link>https://dev.to/uzainahmed/diff-review-a-local-pre-push-code-reviewer-built-for-a-friend-40e3</link>
      <guid>https://dev.to/uzainahmed/diff-review-a-local-pre-push-code-reviewer-built-for-a-friend-40e3</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;diff-review is a small CLI and git pre-push hook. When you run git push, it grabs the diff, drops the noise (lockfiles, build output, binaries), sends it to an open-weight model through Ollama, and prints up to five short bullets about likely bugs, leftover debug code, and missing tests. Then your push continues.&lt;/p&gt;

&lt;p&gt;It never blocks a push unless you opt in with --strict. If the model is offline, it prints "review skipped" and moves on.&lt;/p&gt;

&lt;p&gt;I built it for a friend who is a developer and still getting comfortable with the terminal. He wanted a quick sanity check on his code before pushing, without sending it to a hosted service.&lt;/p&gt;

&lt;p&gt;I showed it to him, and his feedback was honest: it would be better with a smarter model, and better still with a UI. The terminal-only setup is hard for him right now. I've put that in the "What's next" section below because it's the most useful thing I learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/GrqCgNiQphw" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/uzainmalik123" rel="noopener noreferrer"&gt;
        uzainmalik123
      &lt;/a&gt; / &lt;a href="https://github.com/uzainmalik123/diff-review" rel="noopener noreferrer"&gt;
        diff-review
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;diff-review&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Local CLI and git pre-push hook that reviews your diff using an open-weight model running on your machine.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Example&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;diff-review · gemma3:1b via ollama · diff-file · 1 of 1 files · 142 lines
- src/api.ts: fetch result is used without checking response.ok
- src/api.ts: console.log left in getUser()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Why local and open-weight&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Code never leaves your machine&lt;/strong&gt; by default (Ollama runs locally). If you use OpenRouter, the diff is sent to that hosted service (see privacy note below).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model is swappable&lt;/strong&gt; via CLI flags, environment variables, or config; no code changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free to run.&lt;/strong&gt; Small 1B models give shallow reviews and are &lt;strong&gt;advisory only&lt;/strong&gt; - they may miss things and sometimes produce unhelpful output. We also include &lt;strong&gt;rule-based checks plus model review&lt;/strong&gt; (deterministic checks that catch obvious issues without invoking a model), and we honestly note that a 1B model adds little on top of those checks.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Quick&lt;/h2&gt;…&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/uzainmalik123/diff-review" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;TypeScript on Node with zero runtime dependencies. I wrote a PRD and had OpenCode, an open-source coding agent, build the project from it. Then I tested it myself in a throwaway demo repo, including the case where the model is unreachable.&lt;/p&gt;

&lt;p&gt;The default model is gemma3:1b, served locally by Ollama. The provider and model are config values, so you can point it at a bigger local model or at OpenRouter (the README documents the privacy tradeoff of sending the diff to a hosted service).&lt;/p&gt;

&lt;p&gt;I picked a 1B model so it downloads quickly and runs on any laptop, and I'll be upfront about the cost: it's weak at code review. It misses subtle bugs and sometimes just echoes the prompt. The tool filters and formats its output to keep it short, but a 1B model can only do so much.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;Privacy: by default, the diff never leaves the machine. For a check on unreleased code, a closed API would mean sending it to a third party.&lt;/p&gt;

&lt;p&gt;Swappable: the model is a config value, not a dependency. My friend's main complaint was model quality, and with an open setup the fix is changing one setting, not switching products.&lt;/p&gt;

&lt;p&gt;Free and offline: no API key, no per-token cost, and it works without internet.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
