←back to thread

52 points merge-conflict | 7 comments | | HN request time: 0.871s | source | bottom

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

1. martinohansen ◴[] No.45724911[source]
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.
replies(3): >>45724965 #>>45725088 #>>45729297 #
2. nvartolomei ◴[] No.45724965[source]
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.
3. derwiki ◴[] No.45725088[source]
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.
replies(1): >>45725918 #
4. therein ◴[] No.45725918[source]
Very nice, the fewer neurons you use the better. In biology they call it use it and lose it if my memory serves me correctly.

Neurons that fire together, fry together.

replies(1): >>45727442 #
5. pbh101 ◴[] No.45727442{3}[source]
While I’m deeply skeptical of any attempt to define a commit message from the diff, if the context and motivation is truly captured in the Slack thread or other prior documents and available for summarization, then how many neurons are you really using on rewording what you already hashed out? Especially if someone would otherwise perhaps skip a message or write a poor one, this sounds like a great approach to get at least a first pass to further modify.
6. Ferret7446 ◴[] No.45729297[source]
There are plenty of commits that don't need an explanation like mechanical cleanups or refactoring. If your code is appropriately documented then an LLM can often extract the explanation too.
replies(1): >>45732004 #
7. martinohansen ◴[] No.45732004[source]
If there truly is no need for an explanation, the commit message is very short and won’t require any substantial effort on the author to write.

A fix often has a particular bug it’s addressed, the bug should be explained in the commit. A refactor has a reason, that needs to be explained as well.

I’m not saying LLMs can’t do this, but it needs the context and it’s rarely in the diff of the commit you will find that.