Interactive CLI tool to create consistent, emoji-enhanced Git commit messages with type and scope autocomplete and optional automatic message generation.
- Interactive prompts for commit type, scope (with autocomplete), and message
- Emoji icons associated with commit types for better readability
- Optionally generate a commit message automatically from
git diff - Support CLI options for scripting or shortcuts
- Easy to integrate with git aliases or hooks
Install globally via npm:
npm install -g github:Maliksidk19/git-commit-helperRun the CLI tool:
git-commit-helperYou will be prompted to select a commit type, choose or enter a scope, and write a commit message.
Alternatively, pass options directly:
git-commit-helper -t fix -s api -d "fix login bug"For advanced instructions on how to completely override the default Git commit functionality with git-commit-helper, see the OVERRIDING_GIT_COMMIT.md file.
Create a convenient git alias to replace git commit with the tool:
git config --global alias.cm '!git-commit-helper commit'Then commit with:
git cm| Type | Emoji | Description |
|---|---|---|
| feat | ✨ | New feature |
| fix | 🐛 | Bug fix |
| docs | 📝 | Documentation updates |
| style | 🎨 | Code style or formatting |
| refactor | ♻️ | Code refactoring |
| test | ✅ | Adding or fixing tests |
| chore | 🔧 | Maintenance tasks |
| perf | ⚡️ | Performance improvements |
| ci | 👷 | Continuous integration changes |
Common scopes include:
ui,api,auth,db,build,deps,tests,config,styles,docs,core,cli,hooks
You can also enter a custom scope.
Clone the repo and install dependencies:
npm installBuild the project:
npm run buildInstall locally for testing:
npm install -g .Run locally:
npm run startNote: If the video doesn't play in the README, you can download the file and view it locally.
MIT License
Created with ❤️ by Saad