Prompt for every required commit field at commit time, the Node.js way
open sourceMITfree
Commitizen (cz-cli) is a Node.js command-line tool that replaces git commit with git cz: it prompts contributors for each field a project's commit convention needs, so messages come out formatted without waiting for a hook to reject them. A project picks an adapter in its package.json; the Commitizen organisation's own cz-conventional-changelog prompts for the conventional-changelog (AngularJS) format, and dozens of community adapters cover Jira smart commits, emoji and custom formats. It can run through npx, be wired into a prepare-commit-msg hook so plain git commit opens the prompt, and retry a failed commit with --retry. It's not the Python tool Commitizen from commitizen-tools.
Problems it solves
- make every contributor write commit messages in our project's format
- prompt for commit type and scope when committing in a Node.js repo
- write conventional changelog commit messages without memorising the format
Features
- git cz: interactive prompt for each required commit field
- cz-conventional-changelog adapter for the conventional-changelog format
- pluggable adapters, with dozens published by the community
- prepare-commit-msg hook mode so git commit opens the prompt
- --retry to reuse the answers from a failed commit
Limitations
- Tested only against Node.js 12, 14 and 16, though it may work on others1
Alternatives
The same job
These do what Commitizen (cz-cli) does.
- Commitizen Enforce commit message rules, bump versions and generate changelogs
- commit-and-tag-version Bump versions, write the CHANGELOG and tag releases from Conventional Commits
- Changesets A tool to manage versioning and changelogs with a focus on monorepos
- git-cliff A highly customizable changelog generator
- semantic-release Fully automated version management and package publishing
- release-plz Publish Rust crates from CI with a Release PR.
