Skip to content

Latest commit

 

History

History
82 lines (57 loc) · 2.3 KB

File metadata and controls

82 lines (57 loc) · 2.3 KB

ai-commit-msg

AI-powered git commit message generator. Analyzes your staged changes and writes meaningful, conventional commit messages using Google's Gemini AI (free tier).

pip install ai-commit-msg

Quick Start

# Set your free Gemini API key
export GEMINI_API_KEY="your-key-here"  # Get free: https://aistudio.google.com/apikey

# Stage your changes
git add .

# Generate a commit message
ai-commit

# Generate and auto-commit
ai-commit -c

# Skip confirmation
ai-commit -cy

Commit Styles

ai-commit -s conventional   # feat: add user auth (default)
ai-commit -s simple          # Add user authentication
ai-commit -s detailed        # Subject + bullet points

Features

  • Analyzes your actual diff to write accurate messages
  • Matches your existing commit style
  • Supports Conventional Commits format
  • Uses Gemini 2.0 Flash (free, fast, accurate)
  • Zero config — just set your API key

Examples

$ git add src/auth.py tests/test_auth.py
$ ai-commit

============================================================
Generated commit message:
============================================================
feat(auth): add JWT-based user authentication

- Implement login/logout endpoints with token refresh
- Add password hashing with bcrypt
- Include comprehensive test coverage
============================================================

Free Gemini API Key

  1. Go to Google AI Studio
  2. Click "Create API Key"
  3. Set it: export GEMINI_API_KEY="your-key"

The free tier gives you 15 requests/minute — more than enough for commit messages.

More Free AI Tools

Built by Armani (17-year-old developer) as part of a 24-hour coding challenge.

Check out my other free AI tools (no signup required):

All Tools Hub | Support Me | GitHub

License

MIT