
Commitizen
A command-line tool that prompts you for structured fields when writing git commit messages.commitizen/cz-cli
- Stars
- 17.5k
- Forks
- 565
- Licence
- MIT
- Language
- JavaScript
- Last update
- 1 months ago
- Type
- Dev tool
What it is
Commitizen is a command-line tool that replaces git commit with an interactive prompt. Instead of writing a commit message from scratch, you answer questions and the tool formats the message to match the standard your project uses. It catches formatting problems when you commit, rather than later in a git hook that rejects the commit.
- Run git cz or cz instead of git commit to get guided prompts for a commit message
- Set up a repo with the cz-conventional-changelog adapter using commitizen init
- Add an npm script such as "commit": "cz" so teammates can commit with one command
- Wire Commitizen into git's prepare-commit-msg hook so plain git commit also shows the prompts
Great for
- Teams that want every commit message to follow the same format
- Contributors who are unfamiliar with a project's commit message rules
- Projects that use semantic-release or changelog generation from commit messages
Not ideal for
- Solo developers who are happy writing their own commit messages, since the prompts add steps
- Projects that do not use a commit message convention, because the tool needs an adapter to define the format
How to get it
- 1
Install with a package manager
You'll need: Node.js 12, 14, or 16 (tested versions per README; may work on older) · npm 6 or greater
Install globally with npm
npm install -g commitizen - 2
Run it
- Install Commitizen with npm install -g commitizen
- In a git repo that is set up for Commitizen, run git cz or cz instead of git commit
- Answer the prompts and the commit message is created
- 3
Get the most out of it
- Use commitizen init cz-conventional-changelog to set up a repo in one step and save the config to package.json
- Add a local install with npm install --save-dev commitizen so all contributors use the same version
- Name the npm script something other than "commit" if you use husky precommit hooks, to avoid the double-run issue the README describes
- Use the --hook option with git hooks if maintainers want to enforce the format on plain git commit
Downloads
Strengths
- Gives instant feedback on commit message format at commit time
- Removes the need to look up the project's preferred commit format
- Works with adapters, so it can follow different commit conventions
Trade-offs
- Adds an extra step to every commit compared with plain git commit
- Depends on Node.js and npm, and the README says it is tested on Node.js 12, 14, and 16
- Some setup, such as git hooks, requires editing config files by hand
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| cz-cli (this) | 17.5k | Dev tool | beginner | 1 months ago | Teams that want every commit message to follow the same format |
| husky | 35.4k | Dev tool | beginner | 8 months ago | JavaScript or Node.js projects that want shared pre-commit checks |
| commitlint | 18.8k | Dev tool | intermediate | 4 days ago | Teams that already use or want to adopt the conventional commit format |
| onefetch | 12.1k | CLI | beginner | 4 days ago | Developers who want a quick overview of an unfamiliar local repository |
| semantic-release | 24.1k | Dev tool | intermediate | 6 days ago | Maintainers of JavaScript packages who already use a CI service |
| distributions | 13.9k | Dev tool | intermediate | 7 days ago | Linux users who want a Node.js version installed through their system package manager |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.