kleamerkuri

kleamerkuri

Nov 16, 2025 · 11 min read

This Is How To Love Writing Git Commits, Meet Gac

If you’ve ever sat staring at your terminal trying to figure out what to type after git commit -m, this post is for you.

Because I certainly have—many, many times.

And that tiny moment of friction ended up inspiring my first npm package: gac. This AI-powered Git co-pilot writes high-quality commit messages, generates changelogs, and even automates full semantic releases.

I want to share why I built it, how it works under the hood, and why it might become your new favorite addition to your development workflow.

Maybe this will be the inspiration you need to turn one of your daily pain points into an efficient process!

There’s No Such Thing as a Perfect Commit

Writing good commit messages is nobody’s favorite part of software development.

You stage your changes, type git commit, and…pause.

Do you look at your diff trying to summarize work that may have spanned hours?

Most likely not because that’s just unrealistic in the fast-paced engineering world.

What you most likely end up writing is something like “update stuff”, “fix bug maybe?”, or “jira #3456” 😔

We’ve all been there. Even seasoned developers fall into this trap since writing good commit messages is deceptively difficult. It requires context, clarity, consistency, and a surprising amount of mental energy.

So I built gac (Git Auto Commit) to eliminate that friction.

With one command, gac:

  • Analyzes staged changes
  • Understands which files were touched and what was changed
  • Generates multiple high-quality commit messages (based on selected engine)
  • Lets you pick your favorite
  • And adapts to the format your team actually uses

It’s free, local-first, respects your privacy, and integrates seamlessly with both offline and cloud LLMs. And that’s just the beginning.

Note: Since gac is so new, it’s consistently evolving especially in terms of its heuristic fallback logic. Make sure to install either the latest version or be at least on v1.0.6 to be informed of any updates automatically in your terminal!

How Does gac Fix Broken Commit Habits?

As a professional software engineer who maintains her own projects in addition to enterprise ones, I see the same issues repeat themselves:

1. Commit Inconsistency

Teams try to adopt formats like Conventional Commits, but inevitably drift:

  • Some people write feat:
  • Others write feature/
  • Someone else writes “Added feature for…”

The history becomes a patchwork quilt of styles. It’s understandable when different engineers in the team come from various backgrounds; however, such irregular and inconsistent habits make it difficult to scale or welcome new talent.

2. Vague Project History

Without clear messages, understanding who changed what and, most importantly, why, it feels like a challenging investigation where your only clue is a needle in a haystack.

Imagine trying to resolve a bug for code you did not write (or haven’t touched in a while) based on certain visual observations in a repo that has thousands of files.

Good commit messages are documentation, but most teams don’t treat them that way.

Quite frankly, most engineers aren’t even taught how to properly commit. Documentation is often one of the important yet easy-to-fall-behind aspects of development.

3. Mental Overhead

Summarizing complex work into one crisp line is surprisingly exhausting, especially when you’re trying to get into a flow.

This is why most of us end up writing something super generic like “updated packages”.

There’s that dilemma that if you make too many changes, you don’t know what to capture in that single commit. But if you make too many commits, what in the world do you write for each?

4. Automation Breaks Down

Automated changelogs and semantic releases depend on consistent commits; however, humans are, well, human.

We forget. We rush. We break conventions.

gac solves all of this by making high-quality commit messages effortless.

How gac Actually Works Under the Hood

Let’s walk through the architecture that powers this tool. I built it with simplicity and extensibility in mind because it’s a tool built out of necessity, so its purpose is to solve a daily problem.

Tip 🥲
Sometimes you build the coolest things by trying to address a problem or obstacle you face in a daily workflow. I never planned to create such a tool to solve a grand problem developers face. All I did was try to optimize a process I found inefficient to make my life easier and, here we are, with a tool others can use to solve the same problem. It’s brilliant.

Each part is responsible for one thing, and they work together cleanly 👇

Part 1: Understanding Your Code (git.ts)

To generate a meaningful commit message, gac first needs to understand what actually changed.

It starts by running: git diff --cached

That ensures it’s only looking at staged changes, not uncommitted experiments or half-finished work.

But gac goes deeper than a simple diff by:

  • Parsing file status (Added, Modified, Deleted)
  • Extracting line-level details using -numstat
  • Scanning for meaningful identifiers like:
    • function names
    • class names
    • variable names
    • exported symbols
  • Organizing everything into a structured summary

This detailed snapshot becomes the semantic foundation for generating accurate commit messages.

Part 2: The Brains of Multi-Engine AI (the engines/ folder)

This is where gac becomes truly flexible by supporting different “engines” for generating commit messages, depending on your preferences and environment.

Engine 1: The Heuristic Fallback (-engine none)

Without touching any LLM, without requiring internet, and without depending on external APIs, gac can generate useful, sensible commit messages fully offline.

The heuristic engine:

  • Analyzes file paths to infer “scope” (e.g., components/Buttonui)
  • Inspects keywords to infer commit “type” (feat, fix, refactor, chore, etc.)
  • Uses a detectPrimaryFocus helper to understand the intent of the change

For example:

  • Add a new engine → comes out as feat(engine): add new commit generator
  • Modify CLI prompts → refactor(cli): improve UX for selection menu
  • Fix edge case parsing → fix(parser): correct detection of deleted files

This engine is blazing fast and surprisingly accurate, considering it builds its intelligence through clever, custom logic on top of the direct git diff output, rather than offloading it to another package.

Engine 2: Local-Only AI (-engine ollama)

This might be my favorite feature of the entire project (after I got a laptop that can handle running it, that is).

The default engine is Ollama—a private, local LLM runner.

If you have models like Llama 3 or Mistral installed, gac can leverage them without sending your code anywhere.

This is the perfect middle ground:

  • Free
  • Fully private
  • High quality
  • Fast enough for real-time usage

Note ⚠️
I, initially, tried running local AI models on my 2022 8GB MacBook Air and gave up altogether because the laptop crushed every time. But as soon as I updated, I’ve to say I’m thoroughly impressed and will be using local AI for more projects to come. If you’ve, also, tried and been skeptical due to some limitation, I seriously suggest you give it another proper try!

Engine 3: Cloud LLMs (-engine openai or -engine gemini)

If you prefer powerful cloud models, gac supports those too 💁‍♀️

By providing an API key, you can use:

  • GPT-4o-mini
  • Gemini 1.5 Flash
  • Any future OpenAI or Google models supported by the API

All via the simple abstraction in llm-client.ts, which keeps the API layer clean and modular.

More model providers are easy enough to integrate and support. The initial version of the package, however, ships with OpenAI and Google because I’m more familiar with their API usage.

Part 3: A Developer-Friendly CLI (cli.ts)

Once I had most of the core logic in place, there was something bothering me. I didn’t want gac to only be powerful. I wanted gac to be delightful to use.

Admittedly, that might have once been a lot to ask of a CLI tool, but no more. It’s 2025 and the terminal is its own independent entity these days.

Thanks to @clack/prompts, the CLI provides a fast, polished, interactive experience.

Here’s what it gives you:

  • Three diverse options for every commit:
    • Conventional
    • Plain language
    • Gitmoji
  • Length warnings (✓ good length, ⚠ maybe too long)
  • Keyboard shortcuts:
    • 1/2/3 to pick a message
    • r to regenerate
    • p to add a prefix (like a ticket number)
    • q to quit
  • Automatic ticket extraction:
    • Branch names like feature/JIRA-123-update-api → automatically suggest [JIRA-123] prefix

It feels like GitHub Copilot purpose-built for Git and runs directly in your terminal.

The little added polished nuances from @clack bring the entire package together into a comprehensive product.

How gac Automates Your Entire Release Workflow

Once I had commit automation working, I realized something important.

Consistent commit messages unlock even more automation. So gac grew into a full documentation and release automation toolkit.

Tip ⏱️
I’ve noticed a common pattern during recent projects that it’s easy to blow up a “simple” tool or app into a full-stack application or complete tool kit. Though this is good in many ways, it can present its own set of challenges. Once the scope gets bigger and bigger, you run the risk of (a) going over your head for the time you initially committed and (b) struggling to manage all the new features added. It’s the classic case of a project getting bigger than its creator. If you find yourself running into this issue, take a step back, start jotting things down, and prioritize the initial core features your MVP needs before focusing on any specific optimizations or nice-to-haves.

Feature 1: Automatic Changelogs (-changelog)

With one command, gac can:

  • Parse Git history since the last tag
  • Categorize commits into:
    • Added
    • Fixed
    • Changed
    • Deprecated
    • Removed
    • Security
    • Breaking Changes
  • Update or generate CHANGELOG.md

What you get is a polished, human-readable changelog that mirrors what you’d expect from professional open-source projects.

I’m extremely proud of integrating this changelog automation since it’s yet another development feature that gets lost in many practices.

Feature 2: One-Command Semantic Releases (-release)

This one was a game-changer for my own workflow.

Running gac --release will:

  1. Analyze commit history
  2. Determine the correct semver bump:
    • patch
    • minor
    • major
  3. Update CHANGELOG.md
  4. Update package.json version (when running with --update-pkg)
  5. Create an annotated Git tag

In one step, gac handles the entire release pipeline from code changes to published artifacts, powered by the quality commit messages it generates.

Tip: Don’t forget to push tags to your repo! Keep in mind that git push will push your commits but an additional git push --tags is necessary to push annotated tags.

Extra features are available through a short list of flags made to give you, the user, more control over the automation process. These options flags can be referenced both in the repo README, as well as by running gac --help or -h directly in the terminal.

Why gac Deserves a Spot in Your Toolbox

Since there’s nothing to sell or embellish, let’s wrap the value in simple terms.

1. Massive Productivity Boost

You stop wasting time writing and, for the diligent ones out there, rewriting commit messages.

2. Enforces Best Practices Automatically

You get consistent, conventional commit messages effortlessly. No more commit history mystery and definitely easier PRs.

3. Local-First, Privacy-First

You choose your engine:

  • Fully offline heuristic
  • Local LLM with Ollama
  • Or cloud intelligence

Your commits will still be much, much better regardless of what engine you can or cannot use.

And, to take it a step further, the most recent version introduced commit edit on confirmation. This way, you can still leverage the power of structured commits even when running in heuristic mode while adding tailored context 🙌

4. Unlocks Automation

In a single tool, we get clean commit history → automated changelogs → automated releases.

All powered by the conventions gac enforces to streamline the development process documentation in a robust, scalable way.

5. Zero Ongoing Cost

Being a developer these days is expensive. I’m not talking about the cost of courses or classes since those have always been part of the expense equation.

I’m talking monthly costs of $20 here and there for more database space or more model credits to power simple MVPs that showcase possibilities. (I refuse to bring into conversation the $200 monthly price of certain access to AI models; it’s an abomination.)

No API bills unless you choose to use cloud models. That was one of the serious goals with this package.

gac isn’t just a convenience tool—it’s a workflow multiplier.

How to Get Started in 60 Seconds

Copy, paste, and you’re ready to go:

# Install globally
npm install -g @thehelpfultipper/gac

# Use it in any project
git add .
gac

Explore the Project

These include full documentation, examples, and configs.

Start Small, Automate Big

What began as an attempt to make writing commit messages less painful turned into a full-stack automation tool.

gac is a Git co-pilot that respects your workflow, your privacy, and your budget.

gac makes your first commit of the day smoother (and legible).

It makes your last commit of the week cleaner (and part of a logical sequence).

And it automates everything in between, from documentation to releases.

Give gac a try in your project. Your future self, and your teammates, will thank you ✌️

Related Posts

Leave a Comment

Your email address will not be published. Required fields are marked *