A CLI tool for AI-powered Git commit messages using Google Gemini API.
Project description
🚀 AutoCommit-CLI: AI-Powered Git Commit Messages
AutoCommit-CLI is a powerful command-line tool that automates the process of writing meaningful Git commit messages using Google Gemini AI. No more struggling to come up with good commit messages—just let AI do it for you! 🎯
✨ Features
- 🔍 Analyze Git changes and generate meaningful commit messages.
- 🔄 Auto-commit staged changes with AI-generated messages.
- ☁️ Push changes to the repository automatically.
- ⚡ Works with Google Gemini API for intelligent commit suggestions.
- 🏗 Easy to use & install as a CLI tool.
📦 Installation
1️⃣ Install via pip
pip install autocommit-cli
2️⃣ Set Up Google Gemini API Key
AutoCommit-CLI requires a Google Gemini API key. Get your key from Google AI Studio and store it in a .env file in your project:
GEMINI_API_KEY="your_api_key_here"
🛠 Usage
1️⃣ Analyze Changes & Get a Suggested Commit Message
autocommit --analyze
📌 Example Output:
💡 Suggested Commit Message:
fix: resolved authentication issue in login flow
2️⃣ Commit with AI-Generated Message
autocommit --commit
📌 Example Output:
✅ Committed Successfully: fix: updated error handling in user registration
⚙️ How It Works
- The tool fetches staged Git changes using
git diff --staged. - It sends these changes to the Google Gemini API to generate a relevant commit message.
- It commits the changes with the generated message.
- (Optional) It pushes the changes to the repository if
--pushis used.
🔧 Development & Contribution
Want to improve AutoCommit-CLI? Follow these steps:
Clone the repository:
git clone https://github.com/Pranjal-88/Autocommit-CLI.git
cd Autocommit-CLI
Install dependencies:
pip install -r requirements.txt
Run locally for testing:
python autocommit.py --analyze
Contribute:
- Fork the repo ✅
- Create a new branch ✅
- Make your changes ✅
- Submit a pull request ✅
📝 License
This project is licensed under the MIT License.
❤️ Support
If you like this project, give it a ⭐ on GitHub! 🙌
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autocommit_cli-0.1.2.tar.gz.
File metadata
- Download URL: autocommit_cli-0.1.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7c0b24c4ad5e6a0f9008e355fa82782dd315a1a76f62de340787e87195bb461
|
|
| MD5 |
3144c3ae69655a5e39a55df01be1188a
|
|
| BLAKE2b-256 |
bb6b5784ff9b0c1a561ea80de2e67e22bbf00ceb7ce94f9eabb90e0c06dc63b0
|
File details
Details for the file autocommit_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: autocommit_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61b5e04564204a48d4338b2c1d5e437740f5a0107ca302ed2c9cd68b9dad49d8
|
|
| MD5 |
8b70794516b5a75189b81b8ecdfb2fd7
|
|
| BLAKE2b-256 |
82e1569a23c71484ed970d7b4d9f75a04001e927f03790ac0518e258301c871f
|