A CLI tool that helps developers write standardized, expressive commit messages following the Conventional Commits specification.
- 📚 Interactive prompts for commit message creation
- 🎨 Emoji support for visual commit types
- 🔧 Configurable via
.commit-buddy.json
- 📦 Conventional Commits compliant
- 🚀 Non-interactive mode for automation
- 🛠️ Git integration ready
- 📋 Easy-to-use CLI interface
npm install -g @phantasm0009/commit-buddy
npx @phantasm0009/commit-buddy
commit-buddy
This will prompt you through an interactive flow:
? Select commit type: (Use arrow keys)
feat ✨ A new feature
fix 🐛 A bug fix
docs 📝 Documentation changes
style 🎨 Code style updates
refactor ♻️ Refactoring
test ✅ Tests
chore 🔧 Misc tasks
? Scope (optional): auth
? Short message: add login error handling
? Longer description (optional): Improved error display for invalid login attempts.
? Is this a breaking change? No
commit-buddy -t feat -s auth -m "add login logic" -d "Implements JWT and error flow"
-t, --type <type>
: Commit type (feat, fix, docs, etc.)-s, --scope <scope>
: Commit scope (optional)-m, --message <message>
: Commit message-d, --description <description>
: Longer description (optional)-b, --breaking
: Mark as breaking change--dry-run
: Show what would be committed without actually committing
For more detailed usage instructions, see USAGE.md.
--dry-run
: Show the commit command without executing it--config <path>
: Use custom config file
Create a .commit-buddy.json
file in your project root or home directory:
{
"types": {
"feat": "✨",
"fix": "🐛",
"docs": "📝",
"style": "🎨",
"refactor": "♻️",
"test": "✅",
"chore": "🔧",
"perf": "⚡",
"ci": "👷",
"build": "📦",
"revert": "⏪"
},
"scopes": ["auth", "ui", "api", "core"],
"allowEmptyScope": true,
"maxMessageLength": 72
}
Type | Emoji | Description |
---|---|---|
feat |
✨ | A new feature |
fix |
🐛 | A bug fix |
docs |
📝 | Documentation changes |
style |
🎨 | Code style updates |
refactor |
♻️ | Code refactoring |
test |
✅ | Tests |
chore |
🔧 | Maintenance tasks |
perf |
⚡ | Performance improvements |
ci |
👷 | CI/CD changes |
build |
📦 | Build system changes |
revert |
⏪ | Revert changes |
# Interactive mode
commit-buddy
# Quick commit
commit-buddy -t feat -m "add user authentication"
# With scope and description
commit-buddy -t fix -s auth -m "resolve login timeout" -d "Fixed session timeout issue that occurred after 5 minutes of inactivity"
# Breaking change
commit-buddy -t feat -s api -m "update user endpoint" -b
# Dry run (see what would be committed)
commit-buddy -t docs -m "update README" --dry-run
# Clone the repository
git clone https://github.com/Phantasm0009/commit-buddy.git
cd commit-buddy
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
# Test the CLI
npm start
MIT © Phantasm0009
Contributions are welcome! Please feel free to submit a Pull Request.
If you have any questions or need help, please open an issue.