@devchetankp/commit-wizard-cli
v1.0.0
Published
A smart CLI tool that suggests Conventional Commit messages based on staged changes
Maintainers
Readme
🔮 Commit-Wizard
A smart CLI tool that suggests Conventional Commit messages based on your staged changes.
Quick Start
Run directly with npx — no installation required:
npx @devchetankp/commit-wizard-cliCommit-Wizard will analyze your staged files, suggest a commit message, and let you accept, edit, or cancel.
Features
- Interactive file staging — Select which files to stage with a color-coded, multi-select UI (green=new, yellow=modified).
- Smart 'Stage All' option — Quickly stage everything with one click.
- Rule-based suggestions — Automatically detects dependency updates, test changes, documentation, styling, and code changes based on file extensions and diff content.
- Multi-type commit workflow — If you have multiple types of changes, choose to commit all at once or step through each type interactively.
- Loop-back on cancel — Cancel the commit message and return to file selection without losing your progress.
- Git validation — Checks that Git is installed and you're inside a repository before doing anything.
- Persistent configuration — Save your preferred default commit type so the tool remembers your style.
- Post-commit summary — Shows the final message and number of files changed after every commit.
- Interactive UI — Accept the suggestion, edit it, or cancel — all from your terminal.
Manual Installation
Install globally to use commit-wizard anywhere:
npm install -g @devchetankp/commit-wizard-cliThen run:
commit-wizardConfiguration
Set a default commit type that is used when no clear pattern is detected:
commit-wizard config defaultType featView current configuration:
commit-wizard configValid types: feat, fix, chore, docs, style, refactor, test, perf, ci, build.
How It Works
- Reads your staged files and diff.
- Applies heuristics:
package.jsonchanged →chore: update dependenciestests/files changed →test: update unit tests.mdfiles changed →docs: update documentation- Majority
.js/.tsfiles →feat:orfix:(based on diff keywords) - Majority
.css/.scssfiles →style: update styling - No pattern → falls back to your configured
defaultType
- Presents an interactive prompt to commit, edit, or cancel.
- Runs
git commitand prints a summary.
