DEV Community

Cover image for I Built an AI CLI That Writes Git Commits So You Don’t Have To
Raven
Raven

Posted on

I Built an AI CLI That Writes Git Commits So You Don’t Have To

Let’s be honest.

Most commit messages look like this:

fix stuff
update again
final-final-actually-final
Enter fullscreen mode Exit fullscreen mode

They’re useless.

And the worst part? You know they’re bad, but you still write them because stopping to craft a proper message feels like friction.

So I built something to remove that friction entirely.


🚀 Introducing gac (Git Auto Commit)

gac is an AI-powered CLI that analyzes your Git changes and writes structured, meaningful commit messages for you.

Not random fluff.
Not generic summaries.
Actual useful commits.


💥 The Real Problem

Git isn’t broken.
Our habits are.

Bad commit messages create:

  • messy project history
  • painful debugging sessions
  • confusion in team collaboration

And consistency is hard when you're moving fast.

So instead of relying on discipline… I automated it.


⚙️ What gac Does

✨ AI-Generated Commit Messages

Reads your staged changes (diffs) and generates structured messages using the Conventional Commits format.


🔄 Smart Sync Checks

Runs git fetch and warns you if your branch is behind before committing.
No more surprise merge conflicts later.


📦 Interactive Staging

Forgot to stage files?
gac detects that and asks if you want to stage everything.


🚀 Post-Commit Actions

After committing, gac can:

  • push your changes
  • open a GitHub PR (for non-main branches)

🧠 Diff Noise Filtering

Automatically ignores:

  • package-lock.json
  • bun.lock
  • other low-signal files

So the AI focuses on what actually matters.


🎨 Custom Styles

Choose how your commits sound:

  • conventional
  • minimal
  • detailed
  • verbose
  • vibe (for when you're feeling chaotic)

🔌 Extensible by Design

  • .gacignore → exclude files from analysis
  • custom prompts → control AI behavior per repo

🛠 Installation

npm install -g gac-cli
Enter fullscreen mode Exit fullscreen mode

Or from source:

git clone https://github.com/ravvdevv/gac.git
cd gac
bun install
bun link
Enter fullscreen mode Exit fullscreen mode

🔑 Setup

gac --key YOUR_API_KEY
gac --model openrouter/free
Enter fullscreen mode Exit fullscreen mode

🧪 Usage

Just run:

gac
Enter fullscreen mode Exit fullscreen mode

That’s it.


🧩 Useful Flags

gac --amend     # regenerate last commit message
gac --dry-run   # preview without committing
gac --copy      # copy message to clipboard
Enter fullscreen mode Exit fullscreen mode

🤔 Why This Actually Matters

Good commit messages are leverage.

They help you:

  • debug faster
  • collaborate better
  • understand your own code months later

But writing them every time is annoying enough that most people don’t.

So the system breaks.

gac fixes the system, not your motivation.


🔮 What’s Next

This is just the start.

The goal isn’t just “better commits.”
It’s turning the CLI into a smarter workflow assistant that reduces cognitive load across development.


📦 Try It Out

👉 https://github.com/ravvdevv/gac


🧠 Final Thought

If your commit history still looks like:

update
fix
pls work
Enter fullscreen mode Exit fullscreen mode

You don’t need more discipline.

You need better tooling.

Top comments (0)