gitt
is a command-line interface (CLI) tool that helps you write better commit messages by providing a structured workflow, integrating AI for message generation, and offering a user-friendly interactive experience.
- Interactive file selection with
fzf
- Choose commit types from a predefined list
- Automatically format commit messages based on selected type
- Generate commit messages using Cloudflare AI
- Edit AI-generated messages before finalizing
- Confirm commit before execution
- Optional GUI support (via Streamlit, coming soon)
Make sure you have the following dependencies installed:
-
Clone the repository:
git clone https://github.com/usermp/gitt.git cd gitt
-
Install the CLI globally:
chmod +x install.sh ./install.sh
This will copy the
gitt
script to/usr/local/bin/
.
To enable AI commit message generation via Cloudflare AI, you must configure your API credentials:
gitt --config-api
You will be prompted to enter your:
CLOUDFLARE_API_TOKEN
CLOUDFLARE_ACCOUNT_ID
These will be stored securely in ~/.config/gitt/.env
.
Run the following command in a Git repository:
gitt
Workflow:
-
Select files to stage (or
[ALL]
). -
Choose a commit type.
-
Choose whether to use AI to generate the commit message.
-
If AI is used:
- AI suggests a short message.
- You can edit the suggestion or accept it as-is.
-
Review the final commit message.
-
Confirm to execute the commit.
gitt --gui
Type | Description |
---|---|
no type | No specific type selected; for minor or unclear changes |
feat | A new feature |
fix | A bug fix |
chore | Routine tasks and maintenance |
refactor | Code refactoring without functional change |
docs | Documentation updates |
style | Code formatting changes (whitespace, etc.) |
test | Adding or modifying tests |
perf | Performance improvements |
ci | Continuous integration changes |
build | Build system or dependency changes |
revert | Reverting a previous commit |
$ gitt
📁 Select files to stage → fzf interface opens
🔧 Select commit type → e.g., "feat"
🤖 Use AI to generate commit message? [Y/n] → Y
💡 Suggested: Add pagination to product listing
📝 You can now edit the message:
> Add pagination to product listing
✅ Final commit message: [feat] Add pagination to product listing
✔️ Commit created successfully!
Inspired by Sina Bayandorian's original gitt
project, with added AI integration and usability improvements.
Feel free to fork, improve, or suggest features via pull requests or issues.
Licensed under the MIT License. See the LICENSE file for more information.