A CLI tool that analyzes your staged Git changes and generates conventional commit messages automatically.
- 🔍 Analyzes staged changes (additions, deletions, modifications)
- 📝 Generates conventional commit messages (feat, fix, docs, refactor, etc.)
- 🎯 Detects commit type based on file patterns and change context
- 🚀 Simple CLI interface
- 💡 Suggests scope based on modified files
pip install -r requirements.txtStage your changes and run:
python commit_gen.pyThe tool will analyze your staged changes and suggest a commit message following the Conventional Commits specification.
Analyzing staged changes...
Suggested commit message:
feat(auth): add user authentication middleware
Changes detected:
- Added: src/middleware/auth.py
- Modified: src/app.py
- Modified: requirements.txt
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasksperf: Performance improvements
- Runs
git diff --cached --statto get staged changes - Analyzes file paths and change patterns
- Determines appropriate commit type and scope
- Generates a descriptive commit message
MIT