Package Exports
- git-commit-assistant
- git-commit-assistant/bin/git-commit-assistant
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (git-commit-assistant) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Git Commit Assistant
AI-powered Git commit assistant that helps you write better commit messages using Google's Gemini AI.
Features
- 🤖 AI-powered commit message suggestions
- 📝 Conventional commits format with emojis
- 🔍 Smart analysis of your changes
- 🎨 Beautiful CLI interface
- 🔒 Protected branch validation
- 🚀 Optional automatic push
Installation
Via NPM (Recommended)
npm install -g git-commit-assistant
The installation will automatically create a Python virtual environment and install all dependencies.
Updating
To update to the latest version:
npm install -g git-commit-assistant@latest
Via Python (Alternative)
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
# On Unix/macOS:
source venv/bin/activate
# On Windows:
.\venv\Scripts\activate
# Install package
pip3 install git-commit-assistant
Setup
- Get your Gemini API key from Google AI Studio
- Set your API key:
export GEMINI_API_KEY='your-api-key'
Usage
Instead of git commit
, you can use either:
gcommit # Short command (recommended)
git-commit-assistant # Full command
Available options:
gcommit -a # Stage all changes
gcommit -p # Push after commit
gcommit -f # Skip confirmations
# Combine options
gcommit -a -p # Stage all changes and push
gcommit -a -p -f # Stage all, push, and skip confirmations
The assistant will:
- Show your staged/unstaged changes
- Analyze the changes using AI
- Suggest a commit message following conventional commits
- Let you edit or accept the message
- Create the commit (and push if requested)
Requirements
- Python 3.6+
- Node.js 14+ (for NPM installation)
- Git
License
MIT
Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.