export OPENAI_API_KEY="your-api-key-here"Get your key at: https://platform.openai.com/api-keys
npx git-rewrite-commits --install-hooksgit add .
git commit
# ✨ AI message appears automatically in your editor!- When: Every time you run
git commit - What: Generates AI message based on your staged changes
- Result: Editor opens with perfect commit message ready to use
- When: After you commit
- What: Reviews and improves your commit message
- Result: Automatically fixes poor messages
- When: Before
git push - What: Reviews unpushed commits
- Result: Offers to fix messages before pushing
git config hooks.commitTemplate "[JIRA-XXX] feat: message"git config hooks.commitLanguage "es" # Spanish
git config hooks.commitLanguage "fr" # French
git config hooks.commitLanguage "ja" # JapaneseTo remove hooks:
rm .git/hooks/prepare-commit-msg
rm .git/hooks/post-commit
rm .git/hooks/pre-pushgit add src/auth.ts
git commitfeat(auth): implement JWT token validation middleware
# ✨ AI-generated commit message above
# Feel free to edit as needed before saving
#
# Files being committed:
# M src/auth.ts
export OPENAI_API_KEY="sk-..."
# Add to ~/.bashrc or ~/.zshrc to make permanent# Check if installed
ls -la .git/hooks/
# Reinstall
npx git-rewrite-commits --install-hooks# Per repository
git config hooks.commitTemplate "🚀 feat: message"
# Global (all repositories)
git config --global hooks.commitTemplate "feat(scope): message"- ✅ Zero effort - AI writes your commit messages
- ✅ Consistent format - Always follows conventions
- ✅ Team-friendly - Everyone gets same quality
- ✅ Time-saving - No more thinking about messages
- ✅ Educational - Learn good commit practices
- Try the tool on a test repository first
- Configure your preferred template
- Share with your team!
Need help? Create an issue at: https://github.com/yourusername/git-rewrite-commits