A utility for automatically generating meaningful commit messages using OpenAI API.
- 🤖 Automatic commit message generation based on git diff
- 🎯 Conventional commits format support
- 😊 Automatic emoji insertion after type colon
- 🚀 Fully automated process (no interactive prompts)
- 📝 Multi-line commit messages support
- 🔄 Automatic push after commit
- Clone the repository:
git clone <repository-url>
cd auto-commit
- Create
.env
file and add your OpenAI API key:
OPENAI_API_KEY=your-key-here
- Make the script executable:
chmod +x scripts/generate-commit-message.sh
To create a commit simply use:
make commit
The script will automatically:
- Add all changes to staging area
- Generate a meaningful commit message with emoji
- Create a commit
- Push changes
feat:✨ Add new authentication system
fix:🐛 Resolve memory leak in background tasks
docs:📚 Update deployment instructions
style:💄 Improve code formatting
refactor:♻️ Optimize database queries
test:✅ Add unit tests for auth module
chore:🔧 Update dependencies
- Python 3.x
- Git
- Make
.
├── .env # Environment variables
├── Makefile # Make commands
├── README.md # Documentation
└── scripts/
└── generate-commit-message.sh # Main script