September 15, 2026
cmt: AI Git Commit Assistant
Writing good Git commit messages sounds simple, but it can become repetitive. After making several changes, it is easy to write vague messages such as:
- fixed stuff
- updated code
- changed
- wip
- final fix
These messages may be enough for a personal project, but they are not very useful when reviewing history, debugging issues, or collaborating with a team.
To make this process easier, I built cmt, an AI powered command-line tool that analyzes staged Git changes and suggests meaningful Conventional Commit messages.
What is cmt?
cmt is a Python CLI tool that generates Git commit messages based on the changes currently staged in a repository.
Instead of manually thinking about the commit message, developers can stage their changes and ask cmt to suggest a message.
For example, after staging changes related to authentication, cmt might suggest:
feat(auth): add refresh token support
The goal is not to blindly commit whatever the AI generates. The tool gives developers a useful starting point that they can review and edit before creating the commit.
How it works?
- Make changes in Git repository.
- Stage the changes
- Run
cmt suggest - Review the suggested commit message.
- Edit it if necessary.
- Create the commit.
How to setup?
You can install cmt directly from PyPi using uv
uv tool install cmt-cli
After installation, configure your OpenAI API key and preferred model:
cmt config set
Then open a Git repository, stage your changes, and run:
cmt suggest
cmt will analyze your staged changes and generate a Conventional Commit message that you can review and edit before committing.
To know the project better, visit https://github.com/bijaydas/cmt
