Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
203 changes: 98 additions & 105 deletions commitizen/cli.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,69 +14,71 @@ usage: cz bump [-h] [--dry-run] [--files-only] [--local-version] [--changelog]
[--allow-no-commit]
[MANUAL_VERSION]

bump semantic version based on the git log
Bump semantic version based on the git log

positional arguments:
MANUAL_VERSION bump to the given version (e.g: 1.5.3)
MANUAL_VERSION Bump to the given version (e.g., 1.5.3).

options:
-h, --help show this help message and exit
--dry-run show output to stdout, no commit, no modified files
--files-only bump version in the files from the config
--local-version bump only the local version portion
--changelog, -ch generate the changelog for the newest version
--no-verify this option bypasses the pre-commit and commit-msg
hooks
--yes accept automatically questions done
--dry-run Perform a dry run, without committing or modifying
files.
--files-only Bump version in the `version_files` specified in the
configuration file only.
--local-version Bump version only the local version portion (ignoring
the public version).
--changelog, -ch Generate the changelog for the latest version.
--no-verify Bypass the pre-commit and commit-msg hooks.
--yes Accept automatically answered questions.
--tag-format TAG_FORMAT
the format used to tag the commit and read it, use it
in existing projects, wrap around simple quotes
The format used to tag the commit and read it. Use it
in existing projects, and wrap around simple quotes.
--bump-message BUMP_MESSAGE
template used to create the release commit, useful
when working with CI
Template used to create the release commit, useful
when working with CI.
--prerelease {alpha,beta,rc}, -pr {alpha,beta,rc}
choose type of prerelease
Type of prerelease.
--devrelease DEVRELEASE, -d DEVRELEASE
specify non-negative integer for dev. release
Specify non-negative integer for dev release.
--increment {MAJOR,MINOR,PATCH}
manually specify the desired increment
Specify the desired increment.
--increment-mode {linear,exact}
set the method by which the new version is chosen.
'linear' (default) guesses the next version based on
typical linear version progression, such that bumping
of a pre-release with lower precedence than the
current pre-release phase maintains the current phase
of higher precedence. 'exact' applies the changes that
Set the method by which the new version is chosen.
'linear' (default) resolves the next version based on
typical linear version progression, where bumping of a
pre-release with lower precedence than the current
pre-release phase maintains the current phase of
higher precedence. 'exact' applies the changes that
have been specified (or determined from the commit
log) without interpretation, such that the increment
and pre-release are always honored
log) without interpretation, ensuring the increment
and pre-release are always honored.
--check-consistency, -cc
check consistency among versions defined in commitizen
configuration and version_files
--annotated-tag, -at create annotated tag instead of lightweight one
Check consistency among versions defined in Commitizen
configuration file and `version_files`.
--annotated-tag, -at Create annotated tag instead of lightweight one.
--annotated-tag-message ANNOTATED_TAG_MESSAGE, -atm ANNOTATED_TAG_MESSAGE
create annotated tag message
--gpg-sign, -s sign tag instead of lightweight one
Create annotated tag message.
--gpg-sign, -s Sign tag instead of lightweight one.
--changelog-to-stdout
Output changelog to the stdout
Output changelog to stdout.
--git-output-to-stderr
Redirect git output to stderr
--retry retry commit if it fails the 1st time
--major-version-zero keep major version at zero, even for breaking changes
Redirect git output to stderr.
--retry Retry commit if it fails for the first time.
--major-version-zero Keep major version at zero, even for breaking changes.
--template TEMPLATE, -t TEMPLATE
changelog template file name (relative to the current
working directory)
Changelog template file name (relative to the current
working directory).
--extra EXTRA, -e EXTRA
a changelog extra variable (in the form 'key=value')
Changelog extra variables (in the form 'key=value').
--file-name FILE_NAME
file name of changelog (default: 'CHANGELOG.md')
File name of changelog (default: 'CHANGELOG.md').
--prerelease-offset PRERELEASE_OFFSET
start pre-releases with this offset
Start pre-releases with this offset.
--version-scheme {pep440,semver,semver2}
choose version scheme
Choose version scheme.
--version-type {pep440,semver,semver2}
Deprecated, use --version-scheme instead
Deprecated, use `--version-scheme` instead.
--build-metadata BUILD_METADATA
Add additional build-metadata to the version-number
--get-next Determine the next version and write to stdout
--allow-no-commit bump version without eligible commits
Add additional build-metadata to the version-number.
--get-next Determine the next version and write to stdout.
--allow-no-commit Bump version without eligible commits.
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,37 @@ usage: cz changelog [-h] [--dry-run] [--file-name FILE_NAME]
[--extra EXTRA] [--tag-format TAG_FORMAT]
[rev_range]

generate changelog (note that it will overwrite existing file)
Generate changelog (note that it will overwrite existing files)

positional arguments:
rev_range generates changelog for the given version (e.g: 1.5.3)
or version range (e.g: 1.5.3..1.7.9)
rev_range Generate changelog for the given version (e.g., 1.5.3)
or version range (e.g., 1.5.3..1.7.9).

options:
-h, --help show this help message and exit
--dry-run show changelog to stdout
--dry-run Show changelog to stdout.
--file-name FILE_NAME
file name of changelog (default: 'CHANGELOG.md')
File name of changelog (default: 'CHANGELOG.md').
--unreleased-version UNRELEASED_VERSION
set the value for the new version (use the tag value),
instead of using unreleased
--incremental generates changelog from last created version, useful
if the changelog has been manually modified
Set the value for the new version (use the tag value),
instead of using unreleased versions.
--incremental Generate changelog from the last created version,
useful if the changelog has been manually modified.
--start-rev START_REV
start rev of the changelog. If not set, it will
generate changelog from the start
--merge-prerelease collect all changes from prereleases into next non-
prerelease. If not set, it will include prereleases in
the changelog
Start rev of the changelog. If not set, it will
generate changelog from the beginning.
--merge-prerelease Collect all changes from prereleases into the next
non-prerelease. If not set, it will include
prereleases in the changelog.
--version-scheme {pep440,semver,semver2}
choose version scheme
Choose version scheme.
--export-template EXPORT_TEMPLATE
Export the changelog template into this file instead
of rendering it
of rendering it.
--template TEMPLATE, -t TEMPLATE
changelog template file name (relative to the current
working directory)
Changelog template file name (relative to the current
working directory).
--extra EXTRA, -e EXTRA
a changelog extra variable (in the form 'key=value')
Changelog extra variables (in the form 'key=value').
--tag-format TAG_FORMAT
The format of the tag, wrap around simple quotes
The format of the tag, wrap around simple quotes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@ usage: cz check [-h]
[--allow-abort] [--allowed-prefixes [ALLOWED_PREFIXES ...]]
[-l MESSAGE_LENGTH_LIMIT]

validates that a commit message matches the commitizen schema
Validate that a commit message matches the commitizen schema

options:
-h, --help show this help message and exit
--commit-msg-file COMMIT_MSG_FILE
ask for the name of the temporal file that contains
the commit message. Using it in a git hook script:
MSG_FILE=$1
Ask for the name of the temporary file that contains
the commit message. Use it in a git hook script:
MSG_FILE=$1.
--rev-range REV_RANGE
a range of git rev to check. e.g, master..HEAD
Validate the commits in the given range of git rev,
e.g., master..HEAD.
-d, --use-default-range
check from the default branch to HEAD. e.g,
refs/remotes/origin/master..HEAD
Validate the commits from the default branch to HEAD,
e.g., refs/remotes/origin/master..HEAD.
-m MESSAGE, --message MESSAGE
commit message that needs to be checked
--allow-abort allow empty commit messages, which typically abort a
commit
Validate the given commit message.
--allow-abort Allow empty commit messages, which typically abort a
commit.
--allowed-prefixes [ALLOWED_PREFIXES ...]
allowed commit message prefixes. If the message starts
by one of these prefixes, the message won't be checked
against the regex
Skip validation for commit messages that start with
the specified prefixes.
-l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT
length limit of the commit message; 0 for no limit
Restrict the length of the **first line** of the
commit message; 0 for no limit.
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@ usage: cz commit [-h] [--retry] [--no-retry] [--dry-run]
[--write-message-to-file FILE_PATH] [-s] [-a] [-e]
[-l MESSAGE_LENGTH_LIMIT] [--]

create new commit
Create new commit

options:
-h, --help show this help message and exit
--retry retry last commit
--no-retry skip retry if retry_after_failure is set to true
--dry-run show output to stdout, no commit, no modified files
--retry Retry the last commit.
--no-retry Skip retry if --retry or `retry_after_failure` is set
to true.
--dry-run Perform a dry run, without committing or modifying
files.
--write-message-to-file FILE_PATH
write message to file before committing (can be
combined with --dry-run)
-s, --signoff Deprecated, use 'cz commit -- -s' instead
-a, --all Tell the command to automatically stage files that
have been modified and deleted, but new files you have
not told Git about are not affected.
-e, --edit edit the commit message before committing
Write message to FILE_PATH before committing (can be
used with --dry-run).
-s, --signoff Deprecated, use `cz commit -- -s` instead.
-a, --all Automatically stage files that have been modified and
deleted, but new files you have not told Git about are
not affected.
-e, --edit Edit the commit message before committing.
-l MESSAGE_LENGTH_LIMIT, --message-length-limit MESSAGE_LENGTH_LIMIT
length limit of the commit message; 0 for no limit
-- Positional arguments separator (recommended)
Set the length limit of the commit message; 0 for no
limit.
-- Positional arguments separator (recommended).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
usage: cz example [-h]

show commit example
Show commit example

options:
-h, --help show this help message and exit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
usage: cz info [-h]

show information about the cz
Show information about the cz

options:
-h, --help show this help message and exit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
usage: cz init [-h]

init commitizen configuration
Initialize commitizen configuration

options:
-h, --help show this help message and exit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
usage: cz ls [-h]

show available commitizens
Show available Commitizens

options:
-h, --help show this help message and exit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
usage: cz schema [-h]

show commit schema
Show commit schema

options:
-h, --help show this help message and exit
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
usage: cz version [-h] [-r | -p | -c | -v] [--major | --minor]

get the version of the installed commitizen or the current project (default:
Get the version of the installed commitizen or the current project (default:
installed commitizen)

options:
-h, --help show this help message and exit
-r, --report get system information for reporting bugs
-p, --project get the version of the current project
-c, --commitizen get the version of the installed commitizen
-v, --verbose get the version of both the installed commitizen and the
current project
--major get just the major version. Need to be used with --project
-r, --report Output the system information for reporting bugs.
-p, --project Output the version of the current project.
-c, --commitizen Output the version of the installed commitizen.
-v, --verbose Output the version of both the installed commitizen and
the current project.
--major Output just the major version. Must be used with --project
or --verbose.
--minor get just the minor version. Need to be used with --project
--minor Output just the minor version. Must be used with --project
or --verbose.
Loading