AI-powered automatic commit tool that generates quality commit messages and supports multi-project workspace
AI Commit is a Python utility that leverages AI power (Gemini & ChatGPT) to analyze your code changes and automatically generate commit messages following conventional commits standards.
Available in 2 versions:
- ๐ฅ๏ธ CLI Version - Command line interface for terminal lovers
- ๐จ GUI Version - Graphical interface with Tkinter (no additional dependencies!)
- ๐ฏ Auto-Generate Commit Messages - AI analyzes diff and creates descriptive commit messages
- ๐ค Multi AI Provider - Support for Gemini and ChatGPT
- ๐ Multi-Project Support - Manage multiple git repositories in one workspace
- ๐ Auto-Detect Changes - Scan and display which folders have changes
- โ Smart Git Add - Auto-detect changes with selective add option
- ๐ Auto Push - Automatically push to origin current branch
- ๐ Interactive Mode - Confirmation and edit before commit
- ๐จ Conventional Commits - Follow conventional commits standard format
- ๐ผ๏ธ GUI Interface - User-friendly graphical interface
- ๐ Dark Mode - Toggle between light and dark theme for eye comfort
This tool is specifically designed to work with workspace structure like this:
workspace/
โโโ Folder1/ # Git Repository 1
โ โโโ .git/
โ โโโ ...
โโโ Folder2/ # Git Repository 2
โ โโโ .git/
โ โโโ ...
โโโ Folder3/ # Git Repository 3
โ โโโ .git/
โ โโโ ...
โโโ AI-Commit/ # Tool folder (run script from here)
โโโ ai_commit.py
โโโ ai_commit_gui.py
How it works:
- Tool runs from inside
AI-Commitfolder - Automatically scans parent directory to find all git repositories (Folder1, Folder2, Folder3)
- Detects which folders have changes (marked with ๐ด)
- You choose which folder to commit and push
- Python 3.9 or newer
- Git installed
- API Key from Gemini or OpenAI
# Clone repository
git clone https://github.com/RyuCode-Digital-Solution/AI-Commit
# Enter AI-Commit folder
cd AI-Commit
# Install required packages
pip install -r requirements.txt- Visit Google AI Studio
- Login with Google account
- Click "Create API Key"
- Copy the generated API key
- Visit OpenAI Platform
- Login or create account
- Click "Create new secret key"
- Copy the generated API key
Temporary (current session only):
export GEMINI_API_KEY="your-gemini-api-key-here"
export OPENAI_API_KEY="your-openai-api-key-here"Permanent (add to ~/.bashrc or ~/.zshrc):
echo 'export GEMINI_API_KEY="your-gemini-api-key-here"' >> ~/.bashrc
echo 'export OPENAI_API_KEY="your-openai-api-key-here"' >> ~/.bashrc
source ~/.bashrcCommand Prompt (Temporary):
set GEMINI_API_KEY=your-gemini-api-key-here
set OPENAI_API_KEY=your-openai-api-key-herePowerShell (Temporary):
$env:GEMINI_API_KEY="your-gemini-api-key-here"
$env:OPENAI_API_KEY="your-openai-api-key-here"Permanent (System Environment Variables):
- Open "System Properties" โ "Environment Variables"
- Click "New" in User Variables
- Variable name:
GEMINI_API_KEY - Variable value: your-api-key
- Repeat for
OPENAI_API_KEY
- ๐ Auto-Scan - Automatically scan repositories on app startup
- ๐ฏ Visual Selection - Choose repository and files with mouse
- ๐ค One-Click AI - Generate commit message with one click
- ๐ Real-time Log - View all activities in log panel
- โ๏ธ Easy Settings - Toggle AI provider and auto-push
- โ Batch Selection - Select all or clear selection easily
- ๐จ Modern UI - Clean and intuitive interface
- ๐ Dark Mode - Toggle between light and dark theme
- ๐ Smart File Matching - Auto-detect similar files on error
- ๐ Auto Refresh - File list auto-refreshes after staging
# Enter AI-Commit folder
cd AI-Commit
# Run GUI version
python ai_commit_gui.py- Open app โ Auto-scan runs
- Select repository from dropdown (with ๐ด changes indicator)
- Toggle Dark Mode if needed (๐ checkbox top right)
- Select files to commit (or Select All)
- Click "โ Add to Stage" to stage files
- Click "๐ค Generate with AI" for AI commit message (or write manually)
- Review message in text area
- Click "โ Commit & Push" to commit and push
GUI supports light and dark themes for your eye comfort:
How to Activate:
- Check/Uncheck "๐ Dark Mode" checkbox in top right corner
- Theme instantly changes for all components
Dark Theme:
- Dark background (#1e1e1e) comfortable for eyes
- Light text (#ffffff) for optimal contrast
- Gray frames (#2d2d2d) for clear separation
- Dark blue accent (#0e639c) for highlights
- Perfect for night work or dark rooms
Light Theme:
- Light background (#f0f0f0) for bright rooms
- Black text (#000000) for maximum sharpness
- White frames (#ffffff) for clean appearance
- Bright blue accent (#0078d4) for interaction
- Perfect for daytime work or bright rooms
# Enter AI-Commit folder
cd AI-Commit
# Run tool
python ai_commit.py
# Tool will scan parent folder and display repositories
# Choose repository to commit (marked with ๐ด)
# Select files to add
# Review AI-generated commit message
# Confirm and auto push!| Option | Short | Description | Example |
|---|---|---|---|
--provider |
- | Choose AI provider (gemini/chatgpt) | --provider chatgpt |
--dir |
-d |
Specify target directory | --dir ../Folder1 |
--all |
-a |
Add all files without confirmation | --all |
--message |
-m |
Custom commit message (skip AI) | -m "fix: bug" |
--no-push |
- | Commit without push | --no-push |
--help |
-h |
Display help message | --help |
# Auto-detect and interactive
python ai_commit.py
# Specific folder with ChatGPT
python ai_commit.py --dir ../Folder1 --provider chatgpt
# Quick commit with custom message
python ai_commit.py --dir ../Folder2 -m "docs: update README" --no-push
# Full automation
python ai_commit.py --dir ../Folder3 --all| Feature | GUI | CLI |
|---|---|---|
| Ease of Use | โญโญโญโญโญ | โญโญโญ |
| Speed | โญโญโญ | โญโญโญโญโญ |
| Visual Feedback | โญโญโญโญโญ | โญโญ |
| Automation | โญโญ | โญโญโญโญโญ |
| Remote Access | โ | โ |
| Beginner Friendly | โ | |
| Dark Mode | โ | โ |
Recommendation:
- ๐จ Use GUI if: beginner, prefer visual, working locally
- ๐ฅ๏ธ Use CLI if: power user, automation, remote work
Solution:
# Check if already set
echo $GEMINI_API_KEY # Linux/Mac
echo %GEMINI_API_KEY% # Windows CMD
# If empty, set again
export GEMINI_API_KEY="your-api-key" # Linux/Mac
set GEMINI_API_KEY=your-api-key # WindowsSolution:
- Ensure you run tool from inside AI-Commit folder
- Ensure sibling folders (Folder1, Folder2, etc) are git repositories
- Check with:
cd ../Folder1 ls -la .git # Linux/Mac dir .git # Windows
- If not git repo yet, init first:
cd ../Folder1 git init git remote add origin <your-repo-url>
Solution:
Linux:
# Install tkinter
sudo apt-get install python3-tk # Ubuntu/Debian
sudo yum install python3-tkinter # CentOS/RHELmacOS:
# Tkinter already included, but if error:
brew install python-tkWindows:
- Tkinter already included in Python installer
- If missing, reinstall Python and check "tcl/tk" option
A:
- Open GUI app (
python ai_commit_gui.py) - Look at top right corner, there's "๐ Dark Mode" checkbox
- Click checkbox to toggle between light and dark theme
- Theme instantly changes for all UI components
Dark Mode suitable for:
- Night work
- Reducing eye strain
- Low-light rooms
- Personal visual preference
A: No, theme resets to Light Mode each time app opens. This is default behavior for now. If you want Dark Mode as default, edit ai_commit_gui.py:
# Find this line (around line 30):
self.dark_mode = tk.BooleanVar(value=False)
# Change to:
self.dark_mode = tk.BooleanVar(value=True) # Default Dark ModeA: Tool is 100% free and open source. However for AI:
- Gemini API: Free with sufficient daily quota (recommended)
- OpenAI API: Paid, around $0.002 per commit
A:
- โ Tool only sends git diff (code changes) to AI
- โ No data stored on server
- โ API key stored locally in your environment variables
โ ๏ธ Don't commit files containing secrets/passwords/tokens
A: Depends on your needs:
- GUI: Easier for beginners, visual feedback, suitable for daily use
- CLI: Faster, can be automated, suitable for power users and remote work
You can use both! GUI for regular commits, CLI for scripting.
Contributions always welcome!
- Fork repository
- Create feature branch
git checkout -b feature/AmazingFeature
- Commit changes
git commit -m 'feat: add amazing feature' - Push to branch
git push origin feature/AmazingFeature
- Create Pull Request
- CLI Version
- GUI Version with Tkinter
- Dark Mode
- Smart File Matching
- PyQt5/PyQt6 version for advanced GUI
- System tray integration
- Drag & drop file support in GUI
- Git graph visualization
- Multi-repo batch commit
- Config file support
- Plugin system
- AI Providers:
- Google Gemini - Free AI with generous quota
- OpenAI - Powerful GPT models
- Standards:
- Conventional Commits - Commit message format
- Inspired by:
- aicommits by Nutlope
- GitHub Copilot
- ๐ Create issue in repository with
buglabel - Include error message and reproduction steps
- ๐ก Create issue with
enhancementlabel - Explain use case and expected behavior
- ๐ Read FAQ and Troubleshooting above
- ๐ฌ Create issue with
questionlabel - ๐ง Email: dev@ryucode.com
Made with โค๏ธ for developers who value clean commit history
โญ Star this repository if helpful!
๐ Happy Committing with AI!

