Automate commit messages with AI from your git diffs
A

Automate commit messages with AI from your git diffs

Automate commit messages with AI from your git diffs

2,504 stars
N/A forks
N/A contributors

README

Project documentation from GitHub

Stop Writing Commit Messages, Let AI Do It

We've all been there. It's the end of a long coding session, you're ready to push, and you draw a blank. "What did I even do?" You end up typing git commit -m "fix stuff" or "update" for the hundredth time. Good commit messages are crucial for a maintainable project, but in the moment, they feel like a chore.

What if you could automate that? Not with a generic template, but with an AI that actually reads your diff and writes a clear, descriptive message for you. That's exactly what Lumen does.

What It Does

Lumen is a command-line tool that automates your Git commit messages. You run it, it analyzes the staged changes in your repository (the git diff), and uses a local AI model to generate a coherent commit message. It then presents that message to you for approval, editing, or regeneration before committing. It takes the friction out of the last step before git push.

Why It's Cool

The clever part is that it runs locally. Your code diffs never leave your machine. It uses the Ollama platform to run a local Large Language Model (like Llama 3.2 or Mistral), which means you don't need an API key, there are no usage costs, and you maintain complete privacy.

It’s also simple and stays in your workflow. You don't need to change how you use Git. Instead of git commit -m "message", you just run lumen. It shows you what it thinks you did, you say yes (or tweak it), and it handles the commit. It turns a mundane task into a one-second interaction.

How to Try It

Getting started is straightforward. You'll need Ollama installed first to handle the local models.

  1. Install Ollama: Head to ollama.com and download it for your system.
  2. Pull a Model: Once Ollama is running, pull a model. The creator suggests:
    ollama pull llama3.2
    
  3. Install Lumen: Use the Go package manager:
    go install github.com/jnsahaj/lumen@latest
    
  4. Run it: Navigate to your Git repo, stage some changes (git add .), and run:
    lumen
    

Follow the prompts to approve or edit the suggested message. That's it.

Final Thoughts

As developers, we should automate the boring stuff. Writing good commit messages is important, but i

Did you like this issue?

Join our weekly newsletter

Love discovering amazing projects?

Help us continue bringing you the best open-source discoveries every week.

Back to Projects
Last updated: Jan 8, 2026