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
.envfile and add your OpenAI API key:
OPENAI_API_KEY=your-key-here- Make the script executable:
chmod +x scripts/generate-commit-message.shTo create a commit simply use:
make commitThe 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 systemfix:🐛 Resolve memory leak in background tasksdocs:📚 Update deployment instructionsstyle:💄 Improve code formattingrefactor:♻️ Optimize database queriestest:✅ Add unit tests for auth modulechore:🔧 Update dependencies
- Python 3.x
- Git
- Make
.
├── .env # Environment variables
├── Makefile # Make commands
├── README.md # Documentation
└── scripts/
└── generate-commit-message.sh # Main script