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