Transform your Git commits with AI-powered, professional commit messages
Features β’ Installation β’ Quick Start β’ Documentation β’ Contributing
Commit-AI is an intelligent Git commit message generator that analyzes your code changes and creates professional, detailed commit messages following the Conventional Commits specification.
Stop writing vague commits:
git commit -m "fixed stuff"
git commit -m "updates"
git commit -m "wip"
Start writing professional commits:
β¨ feat(api): add JWT authentication system
FEATURES:
- Implemented JWT-based authentication with RS256 signing
- Added login endpoint with rate limiting (5 attempts/minute)
- Created middleware for protected routes with role-based access
TECHNICAL DETAILS:
- 8 files changed: 450 insertions(+), 20 deletions(-)
- Test coverage: 95% on auth module
- Performance: Token validation <1ms average
IMPACT:
- Improved security with industry-standard JWT
- Better user experience with automatic token refresh
- Reduced server load with stateless authentication
- Deep Diff Analysis: Understands code logic, not just file metadata
- Scope Detection: Automatically detects scope from file paths (api, ui, auth, etc.)
- Change Classification: Identifies feat, fix, refactor, perf, docs, and more
- Binary Filtering: Excludes 50+ binary file types (executables, images, audio, video, 3D models, etc.)
- Conventional Commits: Strictly follows the
type(scope): descriptionstandard - Structured Reports: Generates detailed, categorized commit bodies
- Multiple Options: Provides 3 distinct commit message suggestions
- Emoji Support: Optional emoji prefixes for visual enhancement
- Auto-Stage: Detects and offers to stage all changes automatically
- Interactive: Choose from AI suggestions or edit manually
- Verbose Mode: See detailed analysis and debugging information
- Fast: Powered by Groq's Llama 3.1 for near-instant results
- Model Selection: Override AI model with
-mflag - Configuration: Support for project-specific settings
- Auto-Update: Built-in update checker and installer
- Cross-Platform: Windows, macOS, Linux support
- Download
install-commit-ai.exefrom latest release - Run the installer
- Restart your terminal
- Run
commit-ai
- Download
commit-ai-windows-amd64.exefrom releases - Rename to
commit-ai.exe - Add to your PATH
# Intel Macs
curl -L https://github.com/NeelFrostrain/Commit-Ai/releases/latest/download/commit-ai-darwin-amd64 -o /usr/local/bin/commit-ai
chmod +x /usr/local/bin/commit-ai
# Apple Silicon (M1/M2/M3)
curl -L https://github.com/NeelFrostrain/Commit-Ai/releases/latest/download/commit-ai-darwin-arm64 -o /usr/local/bin/commit-ai
chmod +x /usr/local/bin/commit-ai# AMD64
curl -L https://github.com/NeelFrostrain/Commit-Ai/releases/latest/download/commit-ai-linux-amd64 -o ~/.local/bin/commit-ai
chmod +x ~/.local/bin/commit-ai
# ARM64
curl -L https://github.com/NeelFrostrain/Commit-Ai/releases/latest/download/commit-ai-linux-arm64 -o ~/.local/bin/commit-ai
chmod +x ~/.local/bin/commit-aigo install github.com/NeelFrostrain/Commit-Ai@latestVisit Groq Console and create a free API key.
commit-ai
# Enter your API key when prompted
# It will be saved to ~/.commit-ai.env# Make your changes
git add .
# Generate commit message
commit-ai
# Or generate and commit in one step
commit-ai -c# Generate commit message
commit-ai
# Generate and commit automatically
commit-ai -c
# Verbose mode (see analysis details)
commit-ai -v
# Add emojis to commit messages
commit-ai -e
# Skip confirmation prompts
commit-ai -y
# Use different AI model
commit-ai -m llama-3.1-70b-versatile
# Check version
commit-ai version
# Check for updates
commit-ai update --check
# Update to latest version
commit-ai update
# Combine flags
commit-ai -cev # Emoji + Verbose + Auto-commit| Flag | Short | Description |
|---|---|---|
--commit |
-c |
Commit changes after selection |
--yes |
-y |
Skip confirmation prompts |
--verbose |
-v |
Show detailed analysis information |
--emoji |
-e |
Add emojis to commit messages |
--model |
-m |
Override AI model |
--help |
-h |
Show help message |
| Command | Description |
|---|---|
commit-ai |
Generate commit message (default) |
commit-ai version |
Show version information |
commit-ai update |
Update to latest version |
commit-ai update --check |
Check for updates without installing |
commit-ai update --force |
Force update even if on latest version |
- Installation Guide - Detailed setup instructions
- Quick Start - 5-minute setup guide
- Configuration - Environment variables and settings
- Usage Guide - Complete usage documentation
- Examples - Real-world usage examples
- Emoji Reference - Emoji types and usage
- Architecture - Project structure and design
- Building from Source - Build instructions
- Contributing - Contribution guidelines
- Testing - Test suite and coverage
- Changelog - Version history
- Supported Files - File type filtering
- Troubleshooting - Common issues and solutions
- FAQ - Frequently asked questions
- Roadmap - Future enhancements
β¨ feat(api): add user authentication endpoints
β¨ FEATURES:
- π Implemented JWT-based authentication with RS256 signing
- π¦ Added login endpoint with rate limiting (5 attempts/minute)
- π‘οΈ Created middleware for protected routes with role-based access
π SECURITY:
- π Added secure password hashing with bcrypt
- π Implemented token refresh mechanism
- π‘οΈ Configured secure headers (HSTS, CSP)
π§ TECHNICAL DETAILS:
- π 8 files changed: 450 insertions(+), 20 deletions(-)
- β
Test coverage: 95% on auth module
- β‘ Performance: Token validation <1ms average
π‘ IMPACT:
- π Improved security with industry-standard JWT
- π Better user experience with automatic token refresh
- π Reduced server load with stateless authentication
π fix(cache): resolve memory leak in cleanup method
π BUG FIXES:
- Fixed memory leak in cache cleanup method
- Changed cleanup to delete items individually
- Added proper resource cleanup in defer statements
π§ TECHNICAL DETAILS:
- 1 file changed: 15 insertions(+), 8 deletions(-)
- Memory usage reduced by 40% in long-running tests
π‘ IMPACT:
- Prevents memory leak in production
- Improves application stability
- Reduces memory footprint over time
β»οΈ refactor(internal): restructure codebase into modular packages
β»οΈ ARCHITECTURE:
- Separated concerns into dedicated modules (config, git, ai)
- Created clean interfaces between components
- Improved code organization and maintainability
π IMPROVEMENTS:
- Enhanced testability with dependency injection
- Reduced coupling between modules
- Improved code reusability
π§ TECHNICAL DETAILS:
- 15 files changed: 800 insertions(+), 300 deletions(-)
- Test coverage increased from 60% to 85%
π‘ IMPACT:
- Easier to maintain and extend
- Better code quality and organization
- Improved developer experience
Create .env in your project or ~/.commit-ai.env globally:
GROQ_API_KEY=your_key_here
COMMIT_AI_MODEL=llama-3.1-8b-instantCreate .commit-ai.yaml in your project:
model: "llama-3.1-8b-instant"
temperature: 0.7
max_tokens: 15000
rules:
max_title_length: 72
require_scope: false
allowed_types:
- feat
- fix
- docs
- refactor
- test
- chore
scopes:
auto_detect: true
aliases:
frontend: ui
backend: api- Go 1.21 or higher
- Git
- Groq API key
# Clone repository
git clone https://github.com/NeelFrostrain/Commit-Ai.git
cd Commit-Ai
# Install dependencies
go mod download
# Build
make build
# Run tests
make test
# Run with verbose output
./commit-ai -vmake build # Build for development
make build-prod # Build production binary to bin/
make installer # Build installer
make build-all # Build for all platforms
make release # Full release buildmake test # Run tests
make test-coverage # Generate coverage report
make lint # Run linter
make fmt # Format code
make check # Run all checksWe welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
commit-ai -cπ) - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Make sure you have changes
git status
# Stage your changes
git add .
# Or let commit-ai do it
commit-ai # Answer "yes" when prompted# Set it globally
echo "GROQ_API_KEY=your_key" > ~/.commit-ai.env
# Or in your project
echo "GROQ_API_KEY=your_key" > .env- Check your internet connection
- Verify your API key is valid
- Check Groq service status
- Try reducing diff size (stage fewer files)
- Wait a moment and try again
- Upgrade your Groq plan
- Stage fewer files at once
For more troubleshooting, see Troubleshooting Guide.
- Language: Go 1.21+
- AI Model: Groq Llama 3.1
- Test Coverage: 85%+
- Platforms: Windows, macOS, Linux
- Binary Size: 8-10 MB (optimized)
- License: MIT
- Groq for lightning-fast AI inference
- Cobra for CLI framework
- Survey for interactive prompts
- All contributors and users
MIT Β© Neel Frostrain
See LICENSE file for details.
- GitHub: https://github.com/NeelFrostrain/Commit-Ai
- Issues: https://github.com/NeelFrostrain/Commit-Ai/issues
- Releases: https://github.com/NeelFrostrain/Commit-Ai/releases
- Groq Console: https://console.groq.com/keys
Made with β€οΈ by developers, for developers
β Star us on GitHub if you find this useful!