Commitizen prompts contributors through required commit fields at commit time instead of relying on late hook failures. It works with git cz, cz, or npx on Node.js projects.
Overview
Commitizen is a command-line utility that guides developers through structured commit messages when they commit code. It collects required fields up front so teams see formatting feedback immediately.
Install it globally or per project and run git cz, cz, or npx cz instead of a plain git commit. In Commitizen-friendly repositories, answers follow the adapter defined in package.json config.commitizen or a .czrc file, such as the conventional-changelog style.
Maintainers pick an adapter module that defines prompts and message layout. Projects can swap adapters, run Commitizen through git hooks with --hook, retry the last attempt after failed pre-commit tests, and share one adapter across many repos via a custom entry script.
The tool is meant to complement hook-based enforcement rather than replace it, giving contributors a declarative flow while maintainers set the rules. It targets Node.js environments and works with hook helpers like husky when configured appropriately.
Key features
- Prompted interactive commit messages
- Pluggable commit message adapters
- Conventional changelog adapter support
- git cz and npx cz workflows
- Git hook integration via --hook
- Retry last commit with --retry
- Per-repo Commitizen configuration
- Custom shared adapter modules
Use cases
- Enforcing conventional commits
- Onboarding contributors to commit rules
- Standardizing messages across repositories
- Recovering failed pre-commit commit attempts