DEV Community

Shreyas
Shreyas

Posted on

git-catchup CLI Tool

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

git-catchup is a command-line tool that gives you a short briefing on a git repository so you can pick up where you left off.

When you return to a project after some time away, it takes effort to remember where you stopped. You typically have to read through recent commits, check what is uncommitted, and look for the TODO comments you left, just to rebuild the context before you can continue.

git catchup reduces that to a single command. Run it inside any repo and it prints a short briefing on the project and where you left off, so you can start working without reviewing the history first. It shows:

  • Done so far: recent commit subjects
  • Uncommitted: what has changed in your working tree
  • Open: TODO/FIXME comments, grouped by file
  • Notes: from your README and TODO/NOTES/ROADMAP files
  • Start here: one concrete next step

It is useful for anyone who works on side projects, open-source contributions, or several repos at once, and who would rather run one command than reread the history.

Demo

Summary of the repo state.

git catchup --dry-run prints exactly what the model receives.

Code

git-catchup

Catch up on where you left off. Come back to any repo, finished or not, and one command tells you what the project is, what's done, what's still open, and what you'd planned next. It reads your commits, uncommitted work, TODO/FIXME comments, README and notes files (TODO.md, NOTES.md, ROADMAP.md...), and a local open-weight model writes the briefing. Nothing leaves your machine.

$ git catchup

 git catchup | branch: feature/discount-codes (base: main)
 Last commit: 10 days ago | uncommitted edits: 2 days ago
 Uncommitted files: 3 | secrets redacted: 1

**Where you left off** ...
**State of the work** ...
**Next step** ...

Dates, counts and branch names come straight from git. The model only writes the narrative, because small models are bad at facts they can simply look up.

Install (Windows / macOS / Linux)

  1. Install Ollama and pull a model: ollama pull gemma3:4b
  2. pip…

How I Built It

Open-source AI used

  • Models: open-weight gemma3:4b by default. I also tested qwen2.5:3b and llama3.2:3b.
  • Local inference: Ollama, called over local HTTP.
  • Stack: Python 3.11+, standard library only, no dependencies. The model is selected with --model.

How the project is built around the model

The model has a deliberately small job, and everything that can be checked is handled by plain code:

  1. Python collects the facts. Commits, uncommitted files, TODO/FIXME comments and notes are read from git and printed directly. None of that comes from the model.
  2. Secrets are removed before prompting. Secret-looking lines are replaced with [line omitted], and .env, .pem and key files are dropped from diffs. This is regex-based and best-effort.
  3. Python picks the "Start here" item. Priority is a failing test, then a TODO/FIXME (edited files first), then the first line of a notes file.
  4. The model writes three short fields only: project, left_off and next_step. The prompt is built conditionally, so the model only sees instructions that apply to the repo.
  5. The output is validated. It is checked against a JSON schema, retried once with the reasons if a check fails, and replaced per field by a Python fallback if it still fails. Checks include no secret-related words, no backticked filenames that don't exist in the repo, and next_step must be an action, not a question or a list.

git catchup --dry-run prints exactly what the model would see, so the prompt can be audited.

Comparing models

Same branch, three models, one flag. Everything above the divider is identical because plain code writes it from git. Gemma's briefing was cleanest, Llama's accurate but vague, and Qwen said a discount code had been added when it was already committed. Model quality also varies from run to run, which is why facts never come from the model.

In all three runs the guard log was empty, so no guard fired.

Why Does Open Innovation Matter?

git catchup runs on unpushed, half-finished work, which is the code you are least likely to want to send to a third party. Open-weight models run through Ollama made that possible:

  • Your code stays on your machine. The briefing is generated locally, so work in progress is never uploaded anywhere.
  • It works offline. There is no network dependency, so it runs on a plane or with Wi-Fi off.
  • Swapping models takes one flag. I compared Gemma, Llama and Qwen on the same branch with --model, with no new account, API key or billing.
  • It is free to run. There is no per-use cost, so it can be run every time you open a repo.
  • The prompt is fully visible. --dry-run prints exactly what the model receives, so nothing is hidden between the repo and the model.

Closed APIs can also do this task, and many support structured output. For a command you run often on private code, local open-weight models were the better fit.

The Lazy Payoff

On the demo branch I last touched 15 days ago, the manual route to get back into context is: read four commits, check git status, search for TODOs and open the notes file. git catchup gives all of that in one screen, plus a suggested starting point (discounts.py, the TODO about unknown codes).

The cost of running it is a single command.

Prize Categories

Best Use of Gemma. git catchup uses gemma3:4b as its default model, run locally through Ollama. In my three-model comparison on the same branch, Gemma's briefing was the cleanest: accurate, with a concrete next step taken from the TODO in the code.

Top comments (0)