@titenq/conventional-commits
v1.0.0
Published
Interactive CLI for creating Conventional Commits with emojis. A development dependency that standardizes Git commit messages through guided prompts.
Maintainers
Readme
🚀 conventional-commits
A CLI tool for creating semantic git commits with emoji support, powered by Conventional Commits.
Instead of manually typing commit prefixes, conventional-commits guides you through an interactive prompt to choose a commit type, write your message, and automatically format commits with the proper convention.
✨ Features
- ✅ Curated list of commit types with emojis and descriptions
- 🖥️ Interactive CLI using inquirer
- 🔧 Seamless Git hooks integration with husky
- 📦 Built with TypeScript for type safety
- ⚙️ Automatic scope detection from commit messages
- ⚠️ Breaking change indicator support
📦 Installation
Install
conventional-commitsas a development dependency:
npm i -D @titenq/conventional-commitsInitialize Git hooks
npx conventional-commits-init🚀 Usage
git commit -m "commit message"Then follow the interactive prompts:
? Select the commit type:
❯ 🎉 init — Project initialization
📚 docs — Documentation changes
🐛 fix — Bug fixes
✨ feat — New features
♻️ refactor — Code refactoring without behavior changes
⚡️ perf — Performance improvements
💄 style — Code style changes (no logic change)
🧪 test — Adding or updating tests
🗃️ raw — Changes to raw data/files
🧹 cleanup — Cleaning up code or files
(Use arrow keys to reveal more choices)Output:
✔ Select the commit type: 📚 docs — Documentation changes
✅ Commit message updated to: 📚 docs: update README.md
[main 9099229] 📚 docs: update README.mdCommit message with scope
git commit -m "(scope) commit message"✅ Commit message updated to: 🐛 fix(scope): commit messageCommit message with ! to draw attention to breaking change
git commit -m "! commit message"✅ Commit message updated to: ✨ feat!: commit messageCommit message with scope an ! to draw attention to breaking change
git commit -m "(scope)! commit message"✅ Commit message updated to: 🐛 fix(scope)!: commit messageRun without -m flag for full interactive experience:
git commit? Choose a commit type:
🎉 init — Project initialization
📚 docs — Documentation changes
🐛 fix — Bug fixes
...? Type a commit message:🆘 Troubleshooting
If you use ! at the beginning of a commit message, wrap the message in single quotes
'!commit message', or add a space after !"! commit message".
git commit -m '!commit message' // ✅
git commit -m "! commit message" // ✅
git commit -m "!commit message" // ❌📜 Commit Types
| Emoji | Type | Description | |--------|----------|-------------| | 🎉 | init | Project initialization | | 📚 | docs | Documentation changes | | 🐛 | fix | Bug fixes | | ✨ | feat | New features | | ♻️ | refactor | Code refactoring without behavior changes | | ⚡️ | perf | Performance improvements | | 💄 | style | Code style changes (no logic change) | | 🧪 | test | Adding or updating tests | | 🗃️ | raw | Changes to raw data/files | | 🧹 | cleanup | Cleaning up code or files | | 🗑️ | remove | Removing files or code | | 🧱 | ci | Continuous integration changes | | 📦 | build | Build process or dependency changes | | 🛠️ | chore | Maintenance tasks | | ⏪ | revert | Reverting previous commits | | 🔧 | env | Environment variable/config changes |
📦 Uninstall
npm uninstall @titenq/conventional-commits huskyDelete
.huskyfolder
Delete the script
"prepare": "husky"frompackage.json
📜 License
This project is licensed under the GPL3.0 License - see the LICENSE file for details.
