<?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>Forem: Maithil Patil</title>
    <description>The latest articles on Forem by Maithil Patil (@chronos778).</description>
    <link>https://forem.com/chronos778</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3910073%2F8ef56b3b-303c-4293-97d3-678f8b91fd16.jpeg</url>
      <title>Forem: Maithil Patil</title>
      <link>https://forem.com/chronos778</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/chronos778"/>
    <language>en</language>
    <item>
      <title>How I built a CLI tool in Rust that uses AI to brief you on your git state</title>
      <dc:creator>Maithil Patil</dc:creator>
      <pubDate>Tue, 05 May 2026 15:35:13 +0000</pubDate>
      <link>https://forem.com/chronos778/how-i-built-a-cli-tool-in-rust-that-uses-ai-to-brief-you-on-your-git-state-43af</link>
      <guid>https://forem.com/chronos778/how-i-built-a-cli-tool-in-rust-that-uses-ai-to-brief-you-on-your-git-state-43af</guid>
      <description>&lt;p&gt;I built rewind — a CLI that reads your git repo and tells you in plain english where you left off. But the interesting part isn't what it does, it's how it actually works under the hood.&lt;br&gt;
The core problem with context&lt;br&gt;
The naive approach would be to just dump your entire git history into an LLM and ask it to summarize. That works but it's wasteful and noisy. A repo with 500 commits would burn through tokens on irrelevant history.&lt;br&gt;
So rewind only collects what's actually relevant right now:&lt;br&gt;
Current branch name&lt;br&gt;
Last 10 commits with messages and timestamps&lt;br&gt;
Full staged diff&lt;br&gt;
Full unstaged diff&lt;br&gt;
List of untracked files&lt;br&gt;
That's it. Everything else is noise.&lt;br&gt;
Structuring the prompt&lt;br&gt;
The context gets assembled into a structured prompt that tells the LLM exactly what role it's playing and what output format is expected. The key insight here is that you don't want a summary — you want a briefing. Those are different things. A summary recaps what happened. A briefing tells you what matters right now and what's unfinished.&lt;br&gt;
Handling token limits&lt;br&gt;
Bigger repos with lots of changes can generate massive diffs. rewind handles this with a .rewindignore file — same syntax as .gitignore — so you can exclude lockfiles, generated assets, compiled output. Keeps the context clean and the LLM output focused.&lt;br&gt;
There's also a rewind estimate command that shows you token count before making any API call.&lt;br&gt;
Multi-provider support&lt;br&gt;
Rather than locking into one LLM provider, rewind supports Groq, Gemini, OpenAI, and Ollama. The priority order is Groq → Gemini → OpenAI to keep costs low by default. Ollama support means you can run it fully local with zero data leaving your machine.&lt;br&gt;
The rewind commit subcommand&lt;br&gt;
Once I had the git context pipeline working, adding commit message generation was straightforward — same context, different prompt, output formatted as a conventional commit message.&lt;br&gt;
What I learned&lt;br&gt;
The hardest part wasn't the LLM integration. It was figuring out exactly which git data to collect and how to structure it so the output is consistently useful and not just a generic summary. Prompt structure matters way more than model choice for this kind of focused task.&lt;/p&gt;

&lt;p&gt;cargo install git-rewind&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Chronos778/git-rewind" rel="noopener noreferrer"&gt;https://github.com/Chronos778/git-rewind&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rust</category>
      <category>git</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I built a CLI that tells you where you left off in your git repo</title>
      <dc:creator>Maithil Patil</dc:creator>
      <pubDate>Sun, 03 May 2026 09:15:03 +0000</pubDate>
      <link>https://forem.com/chronos778/i-built-a-cli-that-tells-you-where-you-left-off-in-your-git-repo-18i</link>
      <guid>https://forem.com/chronos778/i-built-a-cli-that-tells-you-where-you-left-off-in-your-git-repo-18i</guid>
      <description>&lt;p&gt;I have a bad habit of jumping between projects.&lt;br&gt;
One day I'm fixing a bug in one repo, next day I'm adding a feature somewhere else, and by the time I come back to the first one I have absolutely no idea where I left off. So I do the ritual — git log, git diff, git status, stare at the screen for 5 minutes, slowly remember what I was doing.&lt;/p&gt;

&lt;p&gt;It's not a big deal. But it happens every single day.&lt;/p&gt;

&lt;p&gt;So I built rewind.&lt;br&gt;
You run it inside any git repo and it reads your branch, recent commits, staged and unstaged changes — and feeds all of it to an LLM that gives you a plain english briefing of exactly where you left off and what's unfinished.&lt;/p&gt;

&lt;p&gt;rewind&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foxuz3nm91fibabpbst5e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foxuz3nm91fibabpbst5e.png" alt=" " width="800" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it. No setup, no IDE, no agent loop burning through tokens. Just one binary, one command, one LLM call.&lt;br&gt;
It also has a few extra commands I found myself needing:&lt;br&gt;
rewind commit — generates a conventional commit message from your staged changes&lt;br&gt;
rewind ask "did I finish the auth flow?" — ask anything specific about your current work&lt;br&gt;
Supports Groq, Gemini, OpenAI, and Ollama if you want it fully local with no data leaving your machine.&lt;/p&gt;

&lt;p&gt;cargo install git-rewind&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/Chronos778/git-rewind" rel="noopener noreferrer"&gt;https://github.com/Chronos778/git-rewind&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love feedback — on the idea, the UX, anything. Still early days.&lt;/p&gt;

</description>
      <category>git</category>
      <category>rust</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
