cz-cli
The commitizen command line utility. #BlackLivesMatter
Commitizen is a CLI tool that replaces 'git commit' with an interactive prompt that guides you through writing structured, consistent commit messages, ideal for teams using conventional commits or automated changelog and versioning tools.
Commitizen is a command-line tool that helps you write consistent commit messages when you use git, the version control system most software teams use to track changes. Instead of typing a free-form commit message and hoping it matches your project's preferred style, you run a command that walks you through the required fields and formats the message for you. The README frames it as a way to get instant feedback at commit time rather than having a server-side hook reject your commit later, or having to dig through a CONTRIBUTING document to find the rules.
In practice, once you install it, you commit by typing git cz (or just cz) instead of git commit. If the project has been set up to be Commitizen-friendly, you get an interactive prompt asking for things like the type of change, scope, and a short description, and the message is assembled in the project's required shape. The shape is decided by an adapter chosen by the project. The README walks through setting up the cz-conventional-changelog adapter as the example, which follows the AngularJS commit message convention; the adapter and a small config block are stored in package.json or a .czrc file. You can also wire Commitizen into a git prepare-commit-msg hook so that plain git commit triggers the same interactive flow.
Someone would use this when they want clean, machine-parseable commit history, which downstream tools such as semantic-release can use to generate changelogs and version bumps automatically. The tech stack is JavaScript, installed via npm, and tested against Node.js 12, 14, and 16. The full README is longer than what was provided.
Where it fits
- Enforce consistent conventional commit message formatting across a team so tools like semantic-release can auto-generate changelogs and version bumps.
- Guide yourself through writing structured commit messages with interactive prompts instead of memorizing a commit format convention.
- Wire Commitizen into a git prepare-commit-msg hook so that every plain 'git commit' triggers the interactive prompt automatically.