Git-Smart-Commit v1.0.0 🚀
The first stable release of Git-Smart-Commit, a local CLI tool that uses Google Gemini AI to analyze staged Git changes and generate Conventional Commit messages automatically.
✨ Features
- 🤖 AI-powered commit message generation using Google Gemini
- 🔍 Analyzes the entire staged Git diff
- 🧠 Identifies the primary purpose of changes across multiple files
- 📝 Generates Conventional Commit messages
- 🎯 Automatically determines the most relevant commit type and scope
- 📏 Validates commit message structure and subject length
- 📄 Generates an optional commit body for complex changes
- ✅ Interactive confirmation before creating a commit
- 🚀 Optional push directly to the current remote branch
- 🔄 Falls back to clear error handling when Gemini is unavailable
- 💻 Works as a local CLI tool inside any Git repository
🛠️ Supported Commit Types
feat— New functionalityfix— Bug fixesdocs— Documentation changesstyle— Code formatting/style changesrefactor— Code restructuringperf— Performance improvementstest— Testsbuild— Build system or dependency changesci— CI/CD configurationchore— Maintenance changesrevert— Revert previous changes
🚀 Installation
Make sure Go is installed, then run:
```bash
go install github.com/IchwanArdi/git-smart-commit@latest
```
After installation:
```bash
git-smart-commit
```
📖 Basic Usage
Stage your changes first:
```bash
git add .
```
Then run:
```bash
git-smart-commit
```
Git-Smart-Commit analyzes the staged changes and suggests a commit message.
Example:
```
🤖 Suggested commit:
feat(ai): implement structured JSON commit suggestions
Update Gemini integration to generate structured commit
suggestions and validate the resulting message.
```
You can then confirm the generated commit and optionally push it to the remote repository.
🔐 Requirements
- Go 1.16+
- Git
- Google Gemini API key
Set your API key as:
```bash
GEMINI_API_KEY=your_api_key
```
📌 Notes
Git-Smart-Commit analyzes only changes that have been staged with git add. The tool does not automatically stage files for you.
First stable release — v1.0.0