Skip to main content

Python commitizen client tool

Project description

GitHub Workflow Status Conventional Commits PyPI Package latest release PyPI Package download count (per month) Supported versions homebrew Codecov pre-commit

Using commitizen cli


Documentation: https://commitizen-tools.github.io/commitizen/


About

Commitizen is release management tool designed for teams.

Commitizen assumes your team uses a standard way of committing rules and from that foundation, it can bump your project's version, create the changelog, and update files.

By default, commitizen uses conventional commits, but you can build your own set of rules, and publish them.

Using a standardized set of rules to write commits, makes commits easier to read, and enforces writing descriptive commits.

Features

  • Command-line utility to create commits with your rules. Defaults: Conventional commits
  • Bump version automatically using semantic versioning based on the commits. Read More
  • Generate a changelog using Keep a changelog
  • Update your project's version files automatically
  • Display information about your commit rules (commands: schema, example, info)
  • Create your own set of rules and publish them to pip. Read more on Customization

Requirements

Python 3.8+

Git 1.8.5.2+

Installation

To make commitizen available in your system

pip install --user -U Commitizen

Python project

You can add it to your local project using one of these:

pip install -U commitizen

for Poetry >= 1.2.0:

poetry add commitizen --group dev

for Poetry < 1.2.0:

poetry add commitizen --dev

macOS

via homebrew:

brew install commitizen

Usage

Most of the time this is the only command you'll run:

cz bump

On top of that, you can use commitizen to assist you with the creation of commits:

cz commit

Read more in the section Getting Started.

Help

$ cz --help
usage: cz [-h] [--debug] [-n NAME] [-nr NO_RAISE] {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version} ...

Commitizen is a cli tool to generate conventional commits.
For more information about the topic go to https://conventionalcommits.org/

optional arguments:
  -h, --help            show this help message and exit
  --config              the path of configuration file
  --debug               use debug mode
  -n NAME, --name NAME  use the given commitizen (default: cz_conventional_commits)
  -nr NO_RAISE, --no-raise NO_RAISE
                        comma separated error codes that won't rise error, e.g: cz -nr 1,2,3 bump. See codes at https://commitizen-
                        tools.github.io/commitizen/exit_codes/

commands:
  {init,commit,c,ls,example,info,schema,bump,changelog,ch,check,version}
    init                init commitizen configuration
    commit (c)          create new commit
    ls                  show available commitizens
    example             show commit example
    info                show information about the cz
    schema              show commit schema
    bump                bump semantic version based on the git log
    changelog (ch)      generate changelog (note that it will overwrite existing file)
    check               validates that a commit message matches the commitizen schema
    version             get the version of the installed commitizen or the current project (default: installed commitizen)

Setting up bash completion

When using bash as your shell (limited support for zsh, fish, and tcsh is available), Commitizen can use argcomplete for auto-completion. For this argcomplete needs to be enabled.

argcomplete is installed when you install Commitizen since it's a dependency.

If Commitizen is installed globally, global activation can be executed:

sudo activate-global-python-argcomplete

For permanent (but not global) Commitizen activation, use:

register-python-argcomplete cz >> ~/.bashrc

For one-time activation of argcomplete for Commitizen only, use:

eval "$(register-python-argcomplete cz)"

For further information on activation, please visit the argcomplete website.

Sponsors

These are our cool sponsors!

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commitizen-3.23.0.tar.gz (49.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commitizen-3.23.0-py3-none-any.whl (69.8 kB view details)

Uploaded Python 3

File details

Details for the file commitizen-3.23.0.tar.gz.

File metadata

  • Download URL: commitizen-3.23.0.tar.gz
  • Upload date:
  • Size: 49.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.5.0-1018-azure

File hashes

Hashes for commitizen-3.23.0.tar.gz
Algorithm Hash digest
SHA256 4a42ba962042d7934d4e953b9789323737d0aa2a6d6efde5d6ce2d68eb5e2e71
MD5 6cc2e72392a6c4ca62081b5f1d1785c3
BLAKE2b-256 a4156b3e849e91e3ce39c79ca4251d5ceb66c93b121532c57ba8c853762103d7

See more details on using hashes here.

File details

Details for the file commitizen-3.23.0-py3-none-any.whl.

File metadata

  • Download URL: commitizen-3.23.0-py3-none-any.whl
  • Upload date:
  • Size: 69.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.5.0-1018-azure

File hashes

Hashes for commitizen-3.23.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ccc4d69245c97d14a81c17cb2abedff2e02ef2dfb38cf0e8d5574858456d8916
MD5 ceb237ed4086b7bbbf0bdc408230f715
BLAKE2b-256 3f6fd84ef2a0788686060baf9308d813ca6a180dcf2f19b7dc05bfbf13f08d07

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page