🤖 Commit Genie: The CLI That Writes Your Commits
Stop writing "wip", "fix", or "updates" today. Let AI analyze your code and write the perfect commit message while you sip your coffee.
⚡ Why Use This?
You just spent 3 hours debugging a race condition. The last thing you want to do is summarize 15 files of changes into a string of text.
AI Commit reads your staged changes, understands the context, and generates a structured, meaningful commit message instantly.
- ✨ Intelligent: Distinguishes between a
feat,fix, andchore. - 🎭 Chameleon Mode: Switch tones from "Hardcore Developer" (technical jargon) to "Project Manager" (business value) instantly.
- 📏 Strict or Casual: Enforce Conventional Commits for your repo, or use natural language for personal projects.
📦 Installation
Prerequisites
- Python 3.8+
- Git
- A Google Gemini API Key (It's free!)
Get Started
-
Install:
pip install commit-genie
Or use pipx. Use pip3 if you are on Mac/Linux
💡 Tip: To update to the latest version later, just run:
pip install --upgrade commit-genie -
Configure your Key:
commit-genie config --key "YOUR_GEMINI_API_KEY"
💡 Tip: If you skip step 3, don't worry! The first time you run
commit-genie commit, the tool will detect the missing key and ask you to paste it securely.
🚀 Usage
The "I'm Feeling Lucky" Workflow
Stage your files and let the AI do the rest.
git add .
commit-genie commit
The tool will generate a message, show you a preview, and ask for confirmation before committing.
🎛️ Power User Controls
Don't like the default output? Override everything on the fly.
| Flag | Description | Example | Available Options |
|---|---|---|---|
--type |
Force a specific commit type | --type fix |
feat, fix, docs, chore, refactor, etc. |
--tone |
Change the AI persona | --tone manager |
developer (default), manager |
--style |
Change the message format | --style natural |
conventional (default), natural |
--model |
Use a smarter/different model | --model gemini-2.5-pro |
gemini-2.5-flash, gemini-2.5-pro |
--auto |
YOLO Mode: Commit without asking | --auto |
— |
🎭 The "Persona" Feature
This is where the magic happens. You can configure commit-genie to sound exactly how you need it to.
👨💻 Tone: Developer (Default)
Focuses on technical implementation details, function names, and logic.
Message: feat(auth): implement JWT validation in middleware
👔 Tone: Manager
Focuses on user impact, business value, and high-level summaries.
Message: feat(auth): enable secure user login to improve system safety
Try it:
commit-genie commit --tone manager
⚙️ Configuration
Set it and forget it. Your preferences are saved globally in ~/.commit-genie-config.json.
Set your favorite model: commit-genie config --model gemini-2.5
Set your default style: commit-genie config --style conventional
📂 Project Structure
If you want to hack on the source code, here is how the magic is organized:
.
├── setup.py # The installer
└── commit_genie/ # The brains
├── cli.py # Command line interface (Click)
├── model.py # The "Mega Prompt" & Logic
├── git_reader.py # Reads your staged diffs
└── config.py # Manages your API keys/settings
🤝 Contributing
Got a better prompt? A new persona?
-
Fork the Project
-
Create your Feature Branch (git checkout -b feature/AmazingFeature)
-
Commit your Changes (commit-genie commit) — See what I did there?
-
Push to the Branch (git push origin feature/AmazingFeature)
-
Open a Pull Request
🔮 Future Scope
We are just getting started! Here is what we are planning for v2.0:
- 🧠 Multi-LLM Support: Add support for OpenAI (GPT-4), Anthropic (Claude), and local Ollama models for privacy-focused users.
- 📜 Auto-Changelog: Automatically generate a
CHANGELOG.mdfile based on your commit history. - 🌍 Multi-Language: Generate commit messages in languages other than English (Spanish, French, Chinese, etc.).
- 🖥️ GUI Mode: A simple desktop app for users who prefer clicking over typing commands.
- 🔍 pre-commit Hook Integration: Official support for the pre-commit framework to run checks automatically.
Have an idea? Open an Issue and let's discuss it!
Built with ❤️ and ☕.
Release files for commit-genie 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| commit_genie-1.0.4.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| commit_genie-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.4 kB
Release files / commit_genie-1.0.4.tar.gz
| Download URL | commit_genie-1.0.4.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7696572d5d8ff15750e92e7653950385bf1251882c4274ac84a4c41039de77e
|
|
BLAKE2b-256 checksum How to use checksums |
57a2acd4eb5c3db43d6b89ed4aac7036629385b04557f8d89bf7d5a2337d133d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / commit_genie-1.0.4-py3-none-any.whl
| Download URL | commit_genie-1.0.4-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24a409d4d6b87356214e127d5ac84d2d190c18f1f0cc60e72aaaa921ddc7c49a
|
|
BLAKE2b-256 checksum How to use checksums |
ca3d81b6034f118d9c2e47d2c173abc3d48b09005b9f7d26484dda9f52de06ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|