GitAuto π€β¨
AI-powered commit messages that make sense
GitAuto is a Ruby gem that streamlines your git workflow by automatically generating meaningful commit messages using AI. Say goodbye to generic commit messages and hello to clear, consistent, and informative descriptions of your changes.
Features π
- π― Intelligent Analysis: Automatically analyzes your staged changes
- π‘ Smart Generation: Creates conventional commit messages that actually make sense
- π¨ Beautiful CLI: Interactive and colorful command-line interface
- π Clipboard Integration: Easy copying of generated messages
- π Diff Preview: Optional preview of changes before message generation
- π Message History: Keeps track of your commit messages
- π€ AI Providers: Supports multiple AI providers:
- OpenAI (GPT-4o, GPT-4o mini)
- Anthropic (Claude 3.5 Sonnet, Claude 3.5 Haiku)
- π Secure Storage: Your API keys are encrypted using AES-256-CBC and stored securely
Requirements βοΈ
- Ruby >= 3.0.0
- Git repository with staged changes
- ποΈ One magical ingredient: an API key! Choose your AI companion:
- π OpenAI API key (Get one here)
- ποΈ Anthropic API key (Get one here)
That's it! Say goodbye to "misc fixes" and hello to commits that actually tell a story. Your future self will thank you! π©β¨
Installation π
Install the gem from RubyGems:
gem install git_auto
Or add to your Gemfile:
gem 'git_auto'
Setup and Configuration π§
Initial Setup
Run the setup wizard to configure GitAuto:
git-auto setup
This will guide you through:
- Setting up your preferred AI provider
- Configuring your API keys (stored securely with AES-256-CBC encryption)
- Setting default preferences
Configuration Management
Manage your settings anytime with:
git-auto config
This allows you to:
- Update API keys
- Change AI provider settings
- Modify default behaviors
- View current configuration
Security π
GitAuto takes security seriously:
- API keys are encrypted using AES-256-CBC encryption
- Keys are stored in your system's user directory (
~/.git_auto/credentials.yml
) - You can set a custom encryption key via
GIT_AUTO_SECRET
environment variable
Environment Variables
GitAuto can also be configured through environment variables:
-
OPENAI_API_KEY
: Your OpenAI API key for message generation -
GIT_AUTO_MODEL
: OpenAI model to use (default: gpt-3.5-turbo) -
GIT_AUTO_SECRET
: Custom encryption key for storing API keys (optional)
Usage π οΈ
- Stage your changes as usual:
git add .
- Generate a commit message:
git-auto commit
- Review, edit if needed, and confirm!
Screenshots πΈ
Roadmap πΊοΈ
Here's what we're planning for future releases:
- π€ Support for Google Gemini AI
- π Automatic PR description generation
- More exciting features coming soon!
Contributing π€
Bug reports and pull requests are welcome on GitHub at https://github.com/diazgdev/git_auto.
License π
The gem is available as open source under the terms of the MIT License.
Made with β€οΈ by Guillermo Diaz