frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Git Auto Commit (GAC) – LLM-powered Git commit command line tool

https://github.com/cellwebb/gac
19•merge-conflict•2h ago
GAC is a tool I built to help users spend less time summing up what was done and more time building. It uses LLMs to generate contextual git commit messages from your code changes. And it can be a drop-in replacement for `git commit -m "..."`.

Example:

```

feat(auth): add OAuth2 integration with GitHub and Google

- Implement OAuth2 authentication flow

- Add provider configuration for GitHub and Google

- Create callback handler for token exchange

- Update login UI with social auth buttons

```

Don't like it? Reroll with 'r', or type `r "focus on xyz"` and it rerolls the commit with your feedback!

You can try it out with uvx (no install):

```

uvx gac init # config wizard

uvx gac

```

Note: `gac init` creates a .gac.env file in your home directory with your chosen provider, model, and API key.

*Tech details:*

*14 providers* - Supports local (Ollama & LM Studio) and cloud (OpenAI, Anthropic, Gemini, OpenRouter, Groq, Cerebras, Chutes, Fireworks, StreamLake, Synthetic, Together AI, & Z.ai (including their extremely cheap coding plans!)).

*Three verbosity modes* - Standard with bullets (default), one-liners (`-o`), or verbose (`-v`) with detailed Motivation/Architecture/Impact sections.

*Secret detection* - Scans for API keys, tokens, and credentials before committing. Has caught my API keys on a new project when I hadn't yet gitignored .env.

*Flags* - Automate common workflows:

- `gac -h "bug fix"` - pass hints to guide intent

- `gac -yo` - auto-accept the commit message in one-liner mode

- `gac -ayp` - stage all files, auto-accept the commit message, and push (yolo mode)

Would love to hear your feedback! Give it a try and let me know what you think! <3

GitHub: https://github.com/cellwebb/gac

Comments

acoliver•2h ago
Oh nice. Man I hate filling out all that stuff. And getting the LLM to do it without freestyling and hallucinating is a pain. Kinda wish it were an MCP so I can shove it in my CLI or maybe the hooks for git...
merge-conflict•2h ago
I'm considering making it optionally work as an MCP server!
seba_dos1•1h ago
This misses the point of what a good commit message is so much that it could be a delightful satire.
jacobsenscott•1h ago
Yeah - if these are better than your current commit messages, just don't write commit messages. Anyone can read the code.
alwillis•1h ago
Hate writing commit messages.

Just installed gac; they nailed the UI/UX.

And so far, it works quite well.

merge-conflict•1h ago
Thank you! I used a combination of the questionary and click python libraries for the ui/ux.
avinash-iitb•1h ago
I like that you’ve added secret detection and multi-provider support — that’s something most LLM commit tools miss. Have you benchmarked latency differences between local models (like Ollama) and OpenAI/Anthropic? Would be interesting to see a speed comparison.
adrianbooth17•1h ago
Very neat little project, I look forward to trying this
Steeeve•1h ago
Your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should.
nicksergeant•1h ago
Neat project. If you're looking for something simpler just to use w/ Claude Code, a simple call to "claude -p" can work: https://github.com/nicksergeant/dotfiles/blob/master/zshrc#L...
merge-conflict•1h ago
Thanks! Can definitely do that, but GAC is faster than calling claude or another agent as they will take multiple api calls to look at git status, git diffs, etc. vs a single api call with GAC. Plus, GAC won't eat up your weekly limits! ;)
nicksergeant•1h ago
Oh I just pipe the diff into the Claude prompt, so it's only the one call.
bigwheels•57m ago
aicommit2 works great: https://github.com/tak-bro/aicommit2

Getting started is as easy as installing claude/codex/gemini: npm install -g aicommit2

I'm excited to give gac a try and see how it stacks up! The steering hints with gac might give it an edge.

martinohansen•52m ago
I don’t get these kind of tools. A commit should be the why of a change, not a summary of what it is, anyone can either get that themselves or just read the code if they desire. What you can not get from the code is the _why_ which only you as the author can put.
nvartolomei•48m ago
I do often ask Claude Code or Gemini CLI to write commits. I agree with you on why being important. Majority of these being bug fixes accompanied tests where the why is easily inferred from the change/newly added tests and their comments.
derwiki•38m ago
I often start a change by having Cursor read the Slack thread (via MCP) that is motivating the change. In the same Cursor thread, after making the change, it has fairly good context on the _why_ and writes a helpful commit message.
rwdf•50m ago
"gac" is giving me PTSD flashbacks from having to deal with the "Global Assembly Cache" aeons ago.
ah27182•43m ago
I've been using LMStudio to run a local LLM (Qwen3-4B) to generate commit messages using this command:

```

git diff --staged --diff-filter=ACMRTUXB | jq -Rs --arg prompt 'You are an assistant that writes concise, conventional commit messages. Always start with one of these verbs: feat, fix, chore, docs, style, refactor, test, perf. Write a short!! message describing the following diff:' '{model:"qwen/qwen3-4b-2507", input:($prompt + "\n\n" + .)}' | curl -s http://localhost:1234/v1/responses -H "Content-Type: application/json" -d @- | jq -r ".output[0].content[0].text"

```

cypriss9•31m ago
There's three types of people: those who already write excellent commit messages explaining the why, those who write decent ones explaining the what, and those who write garbage commit messages. Empirically, the first set is small. This tool will help the middle type be more efficient, and help the last type drastically.

Well done OP.

glitch253•5m ago
Hey all - disclaimer I'm one of Cell's friends and encouraged them to release their utility on Pypi for others. It quickly became one of my favorite tools that I use every day.

`git commit` is gone, `uvx gac` is in!