Gitmit is a lightweight CLI tool that analyzes your staged changes and suggests professional commit messages following the Conventional Commits format.
Ever struggled to write a clear and concise commit message? Gitmit simplifies this process by analyzing your changes and suggesting commit messages that adhere to industry standards.
- Smart Analysis: Understands your changes using
git status
andgit diff
- Conventional Commits: Follows the standard format (e.g.,
feat
,fix
,refactor
) - Interactive Mode: Customize or accept suggestions interactively
- Privacy First: Operates entirely offline
- Cross-Platform: Works on Linux, macOS, and Windows
go install github.com/andev0x/gitmit@latest
git clone https://github.com/andev0x/gitmit.git
cd gitmit
go build -o gitmit
sudo mv gitmit /usr/local/bin/
- Visit the OpenAI website at OpenAI.
- If you don't have an account, click on "Sign Up" to create one. If you do, click "Log In".
- Once logged in, navigate to your API key management page.
- Click on "Create new secret key".
- Enter a name for your new key, then click "Create secret key".
- Your new API key will be displayed. Use this key to interact with the OpenAI API.
Note: Your API key is sensitive information. Do not share it with anyone.
Download pre-built binaries from the releases page.
# Stage your changes
git add .
# Run gitmit
gitmit
gitmit --help # Show help message
gitmit --version # Show version number
gitmit --dry-run # Show suggestion without committing
gitmit --verbose # Show detailed analysis
We welcome contributions! Please see the Contributing Guide for details.
# Clone the repository
git clone https://github.com/andev0x/gitmit.git
cd gitmit
# Install dependencies
go mod download
# Run tests
go test ./...
# Build the project
go build -o gitmit
# Run locally
./gitmit --help
This project is licensed under the MIT License. See the LICENSE file for details.
- Inspired by Conventional Commits
- Built with Cobra CLI
- Colored output by Fatih Color
Made with ❤️ by the open source community
Author @github
If you find Gitmit useful, please consider giving it a ⭐ on GitHub!