What is commitizen?
Commitizen is a tool that helps you write consistent and conventional commit messages. It provides a command-line interface (CLI) to guide you through the process of creating commit messages that follow a specified convention, such as the Angular commit message guidelines.
What are commitizen's main functionalities?
Interactive Commit Prompts
Commitizen provides an interactive CLI that prompts you to fill out the different parts of a commit message, ensuring that your commits follow a specified convention. Running `npx cz` will start the interactive prompt.
npx cz
Custom Adapters
Commitizen supports custom adapters that define different commit message conventions. For example, you can initialize the `cz-conventional-changelog` adapter to follow the Angular commit message guidelines.
npx commitizen init cz-conventional-changelog --save-dev --save-exact
Configuration
Commitizen allows you to configure the adapter in your project's `package.json` file. This configuration tells Commitizen which adapter to use for generating commit messages.
{
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Other packages similar to commitizen
commitlint
Commitlint checks if your commit messages meet the conventional commit format. It can be used in conjunction with Commitizen to enforce commit message conventions. While Commitizen helps you write commit messages, Commitlint ensures that they adhere to the specified guidelines.
standard-version
Standard Version is a tool for versioning and changelog generation based on conventional commit messages. It automates the process of version bumping and changelog generation, which complements Commitizen's functionality of creating consistent commit messages.
semantic-release
Semantic Release automates the versioning and package publishing process based on the commit messages. It uses the same conventional commit guidelines that Commitizen helps enforce, making it a good companion tool for automating releases.