DEV Community

Cover image for I built a free AI-powered Git CLI that writes your commit messages for you
David Chinwenmeri
David Chinwenmeri

Posted on

I built a free AI-powered Git CLI that writes your commit messages for you

We've all been there. You just spent 3 hours fixing a bug, you stage your changes, and then you stare at the commit message input like it owes you money. You end up typing fix stuff and moving on.

I got tired of it. So I built gritch.

What is gritch?

gritch is a free, open source CLI tool that uses Groq's free AI API (LLaMA 3.3) to help you write better commits, review your code before pushing, generate changelogs, and understand old commits all from your terminal.

What it can do

Generate a conventional commit message from your staged changes:

git add .
gritch commit
Enter fullscreen mode Exit fullscreen mode

Review your code before pushing:

gritch review
gritch review --language javascript
Enter fullscreen mode Exit fullscreen mode

Explain any commit in plain English:

gritch explain abc1234
Enter fullscreen mode Exit fullscreen mode

Generate a changelog between two versions:

gritch changelog v1.0.0 v1.1.0
Enter fullscreen mode Exit fullscreen mode

How to get started

Install it globally:

npm install -g gritch
Enter fullscreen mode Exit fullscreen mode

Get a free API key from https://console.groq.com and set it:

Windows:

$env:GROQ_API_KEY="your_key_here"
Enter fullscreen mode Exit fullscreen mode

macOS / Linux:

export GROQ_API_KEY="your_key_here"
Enter fullscreen mode Exit fullscreen mode

Then run gritch in any Git project.

Why I built it

I wanted to build something that developers actually use daily not another todo app or weather dashboard. gritch solves a real problem I had every single day, and I built it entirely with TypeScript and Node.js with zero paid services required.

Links

If you find it useful, a star on the repo goes a long way. _

Top comments (1)

Collapse
 
david_chinwenmeri_6a0a73f profile image
David Chinwenmeri

Let's get the engagement started.