Skip to main content

🚀 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

  1. The tool fetches staged Git changes using git diff --staged.
  2. It sends these changes to the Google Gemini API to generate a relevant commit message.
  3. It commits the changes with the generated message.
  4. (Optional) It pushes the changes to the repository if --push is 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! 🙌

Metadata

Release files for autocommit-cli 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autocommit-cli 0.1.2
File Size Uploaded
autocommit_cli-0.1.2.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autocommit-cli 0.1.2
File Interpreter ABI Platform
autocommit_cli-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / autocommit_cli-0.1.2.tar.gz

Download URL autocommit_cli-0.1.2.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b7c0b24c4ad5e6a0f9008e355fa82782dd315a1a76f62de340787e87195bb461
BLAKE2b-256 checksum
How to use checksums
bb6b5784ff9b0c1a561ea80de2e67e22bbf00ceb7ce94f9eabb90e0c06dc63b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / autocommit_cli-0.1.2-py3-none-any.whl

Download URL autocommit_cli-0.1.2-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
61b5e04564204a48d4338b2c1d5e437740f5a0107ca302ed2c9cd68b9dad49d8
BLAKE2b-256 checksum
How to use checksums
82e1569a23c71484ed970d7b4d9f75a04001e927f03790ac0518e258301c871f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page