A lightweight CLI tool that generates clean, Conventional Commit messages from your staged Git changes using OpenAI — fast, minimal, and dependency-free.
TL;DR • Key Features • Quickstart • License
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.
- 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
- 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
git clone https://github.com/saccofrancesco/gitsloth.git
cd gitsloth
go build -o gitslothexport OPENAI_API_KEY=your_api_key_here# 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 |
$ ./gitsloth
⣾ Generating commit message...Proposed commit message:
feat: add clipboard support and structured git context
Accept and commit? (y/n):gitsloth is emailware.
If you find it useful or interesting, I'd like to hear from you.
📩 francescosacco.github@gmail.com
If you like this project:
- ⭐️ Star the repo
- ☕️ Buy me a coffee
- 💌 Send feedback or ideas
📎 You Might Also Like…
- Deepshot: Predict NBA games using machine learning and advanced stats.
- Supremebot: A NiceGUI-powered bot for Supreme drops.
This project is licensed under the MIT License — feel free to use it in your own projects!
GitHub @saccofrancesco