Skip to content

acunningham-ship-it/ai-commit-msg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

AI-powered git commit message generator. Uses Gemini AI (free) to write meaningful commit messages from your diffs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages