Skip to content

saccofrancesco/gitsloth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

113 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

gitsloth: AI-Powered Git Commit Messages

A lightweight CLI tool that generates clean, Conventional Commit messages from your staged Git changes using OpenAI — fast, minimal, and dependency-free.

Contributors Forks Stars

TL;DRKey FeaturesQuickstartLicense


📌 TL;DR

gitsloth is a minimal Go CLI that reads your staged Git diff (along with your branch name and status), generates a Conventional Commit message using OpenAI, and asks for confirmation before committing — or copies the message to your clipboard.


💡 Why gitsloth

  • Writing good commit messages is repetitive
  • Conventional Commits are useful but tedious
  • This tool automates it without adding complexity

It focuses on:

  • zero unnecessary dependencies
  • simple UX
  • predictable output

🔑 Key Features

  • AI-Generated Commit Messages – Uses OpenAI to turn diffs into clean Conventional Commits
  • Rich Git Context – Sends branch name, status, and diff together for more accurate messages
  • Conventional Commits Ready – Enforces proper format and style automatically
  • Interactive Confirmation – You always approve before committing
  • Clipboard Support – Copy the generated message instead of committing directly
  • Zero Dependencies – Uses only the Go standard library
  • Fast CLI Workflow – Designed to fit seamlessly into your Git routine

⚡ Quickstart

git clone https://github.com/saccofrancesco/gitsloth.git
cd gitsloth
go build -o gitsloth

Setup

export OPENAI_API_KEY=your_api_key_here

Usage

# Stage your changes, then generate a commit message
git add .
./gitsloth

# Let the tool stage everything for you
./gitsloth -a

# Copy the generated message to clipboard instead of committing
./gitsloth -c
Flag Shorthand Description
--all -a Stage all changes before generating the commit
--clipboard -c Copy the generated message to clipboard instead of committing

🧪 Example

$ ./gitsloth
⣾ Generating commit message...
Proposed commit message:
feat: add clipboard support and structured git context
Accept and commit? (y/n):

📬 Emailware: Share Your Thoughts

gitsloth is emailware.
If you find it useful or interesting, I'd like to hear from you.

📩 francescosacco.github@gmail.com


🙏 Support

If you like this project:


📎 You Might Also Like…

  • Deepshot: Predict NBA games using machine learning and advanced stats.
  • Supremebot: A NiceGUI-powered bot for Supreme drops.

📜 License

This project is licensed under the MIT License — feel free to use it in your own projects!


GitHub @saccofrancesco

About

AI-powered Git commit message generator enforcing Conventional Commits

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Contributors

Languages