Commitizen

4.13.9 · active · verified Fri Apr 10

Commitizen is a Python client tool that standardizes commit messages, automates version bumping using Semantic Versioning, and generates changelogs. It helps development teams maintain consistent commit history and streamline release processes. The library is actively maintained with frequent patch releases, and the current version is 4.13.9.

Warnings

Install

Imports

Quickstart

To get started, initialize Commitizen in your project, which guides you through creating a configuration file (e.g., in `pyproject.toml` or `.cz.toml`). Then, use `cz commit` for an interactive prompt to create conventional commits, and `cz bump` to automatically increment your project's version and update the changelog based on these commits.

# 1. Initialize Commitizen in your Git repository (creates a .cz.toml or modifies pyproject.toml)
cz init

# 2. Use 'cz commit' instead of 'git commit' for guided, conventional commits
cz commit

# 3. Automatically bump version and generate changelog based on conventional commits
cz bump --changelog

# Example pyproject.toml configuration
# [tool.commitizen]
# name = "cz_conventional_commits"
# version = "0.1.0"
# tag_format = "v$version"
# version_files = [
#     "pyproject.toml:version",
#     "src/__init__.py:__version__"
# ]
# update_changelog_on_bump = true

view raw JSON →