Skip to content

Commit 0ba30ea

Browse files
committed
refactor(cli): reword command help and capitalize the first characters
1 parent 6d7d6cc commit 0ba30ea

11 files changed

+172
-222
lines changed

commitizen/cli.py

Lines changed: 88 additions & 91 deletions
Large diffs are not rendered by default.
Lines changed: 36 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,60 @@
1-
usage: cz bump [-h] [--dry-run] [--files-only] [--local-version] [--changelog]
2-
[--no-verify] [--yes] [--tag-format TAG_FORMAT]
3-
[--bump-message BUMP_MESSAGE] [--prerelease {alpha,beta,rc}]
4-
[--devrelease DEVRELEASE] [--increment {MAJOR,MINOR,PATCH}]
5-
[--increment-mode {linear,exact}] [--check-consistency]
6-
[--annotated-tag]
7-
[--annotated-tag-message ANNOTATED_TAG_MESSAGE] [--gpg-sign]
8-
[--changelog-to-stdout] [--git-output-to-stderr] [--retry]
9-
[--major-version-zero] [--template TEMPLATE] [--extra EXTRA]
10-
[--file-name FILE_NAME] [--prerelease-offset PRERELEASE_OFFSET]
11-
[--version-scheme {pep440,semver,semver2}]
12-
[--version-type {pep440,semver,semver2}]
13-
[--build-metadata BUILD_METADATA] [--get-next]
14-
[--allow-no-commit]
1+
usage: cz bump [-h] [--dry-run] [--files-only] [--local-version] [--changelog] [--no-verify] [--yes] [--tag-format TAG_FORMAT] [--bump-message BUMP_MESSAGE] [--prerelease {alpha,beta,rc}] [--devrelease DEVRELEASE]
2+
[--increment {MAJOR,MINOR,PATCH}] [--increment-mode {linear,exact}] [--check-consistency] [--annotated-tag] [--annotated-tag-message ANNOTATED_TAG_MESSAGE] [--gpg-sign] [--changelog-to-stdout]
3+
[--git-output-to-stderr] [--retry] [--major-version-zero] [--template TEMPLATE] [--extra EXTRA] [--file-name FILE_NAME] [--prerelease-offset PRERELEASE_OFFSET]
4+
[--version-scheme {pep440,semver,semver2}] [--version-type {pep440,semver,semver2}] [--build-metadata BUILD_METADATA] [--get-next] [--allow-no-commit]
155
[MANUAL_VERSION]
166

17-
bump semantic version based on the git log
7+
Bump semantic version based on the git log
188

199
positional arguments:
20-
MANUAL_VERSION bump to the given version (e.g: 1.5.3)
10+
MANUAL_VERSION Bump to the specified version (e.g: 1.5.3)
2111

2212
options:
2313
-h, --help show this help message and exit
24-
--dry-run show output to stdout, no commit, no modified files
25-
--files-only bump version in the files from the config
26-
--local-version bump only the local version portion
27-
--changelog, -ch generate the changelog for the newest version
28-
--no-verify this option bypasses the pre-commit and commit-msg
29-
hooks
30-
--yes accept automatically questions done
14+
--dry-run Show output to stdout, no commit, no modified files
15+
--files-only Bump version in the files from the config
16+
--local-version Bump only the local version portion
17+
--changelog, -ch Generate the changelog for the newest version
18+
--no-verify Bypass the pre-commit and commit-msg hooks
19+
--yes Accept automatically questions done
3120
--tag-format TAG_FORMAT
32-
the format used to tag the commit and read it, use it
33-
in existing projects, wrap around simple quotes
21+
The format used to tag the commit and read it, use it in existing projects, wrap around simple quotes
3422
--bump-message BUMP_MESSAGE
35-
template used to create the release commit, useful
36-
when working with CI
23+
Template for creating the release commit message, useful in CI/CD pipelines
3724
--prerelease, -pr {alpha,beta,rc}
38-
choose type of prerelease
25+
Choose the type of prerelease
3926
--devrelease, -d DEVRELEASE
40-
specify non-negative integer for dev. release
27+
Specify a non-negative integer for dev. release
4128
--increment {MAJOR,MINOR,PATCH}
42-
manually specify the desired increment
29+
Specify a desired increment
4330
--increment-mode {linear,exact}
44-
set the method by which the new version is chosen.
45-
'linear' (default) guesses the next version based on
46-
typical linear version progression, such that bumping
47-
of a pre-release with lower precedence than the
48-
current pre-release phase maintains the current phase
49-
of higher precedence. 'exact' applies the changes that
50-
have been specified (or determined from the commit
51-
log) without interpretation, such that the increment
52-
and pre-release are always honored
31+
Set the method by which the new version is chosen. 'linear' (default) resolves the next version by following typical linear version progression, ensuring that bumping a pre-release with lower
32+
precedence than the current pre-release phase keeps the current phase of higher precedence. 'exact' applies the changes that have been specified (or determined from the commit log) without
33+
interpretation, ensuring that the increment and pre-release are always honored
5334
--check-consistency, -cc
54-
check consistency among versions defined in commitizen
55-
configuration and version_files
56-
--annotated-tag, -at create annotated tag instead of lightweight one
35+
Check consistency among versions defined in `version_files`
36+
--annotated-tag, -at Create an annotated tag instead of a lightweight one
5737
--annotated-tag-message, -atm ANNOTATED_TAG_MESSAGE
58-
create annotated tag message
59-
--gpg-sign, -s sign tag instead of lightweight one
38+
Create an annotated tag message
39+
--gpg-sign, -s Sign the tag instead of a lightweight one
6040
--changelog-to-stdout
61-
Output changelog to the stdout
41+
Output the changelog to the stdout
6242
--git-output-to-stderr
63-
Redirect git output to stderr
64-
--retry retry commit if it fails the 1st time
65-
--major-version-zero keep major version at zero, even for breaking changes
43+
Redirect Git output to stderr
44+
--retry Retry the commit after first failure
45+
--major-version-zero Keep the major version at zero, even for breaking changes
6646
--template, -t TEMPLATE
67-
changelog template file name (relative to the current
68-
working directory)
47+
changelog template file name (relative to the current working directory)
6948
--extra, -e EXTRA a changelog extra variable (in the form 'key=value')
7049
--file-name FILE_NAME
71-
file name of changelog (default: 'CHANGELOG.md')
50+
File name of the changelog (default: 'CHANGELOG.md')
7251
--prerelease-offset PRERELEASE_OFFSET
73-
start pre-releases with this offset
52+
Start pre-releases with this offset
7453
--version-scheme {pep440,semver,semver2}
75-
choose version scheme
54+
Choose the version scheme
7655
--version-type {pep440,semver,semver2}
77-
Deprecated, use --version-scheme instead
56+
Deprecated, use `--version-scheme` instead
7857
--build-metadata BUILD_METADATA
79-
Add additional build-metadata to the version-number
80-
--get-next Determine the next version and write to stdout
81-
--allow-no-commit bump version without eligible commits
58+
Add additional build-metadata to the version number
59+
--get-next Output the next version to stdout
60+
--allow-no-commit Bump the version even when there are no eligible commits
Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,29 @@
1-
usage: cz changelog [-h] [--dry-run] [--file-name FILE_NAME]
2-
[--unreleased-version UNRELEASED_VERSION] [--incremental]
3-
[--start-rev START_REV] [--merge-prerelease]
4-
[--version-scheme {pep440,semver,semver2}]
5-
[--export-template EXPORT_TEMPLATE] [--template TEMPLATE]
6-
[--extra EXTRA] [--tag-format TAG_FORMAT]
1+
usage: cz changelog [-h] [--dry-run] [--file-name FILE_NAME] [--unreleased-version UNRELEASED_VERSION] [--incremental] [--start-rev START_REV] [--merge-prerelease] [--version-scheme {pep440,semver,semver2}]
2+
[--export-template EXPORT_TEMPLATE] [--template TEMPLATE] [--extra EXTRA] [--tag-format TAG_FORMAT]
73
[rev_range]
84

9-
generate changelog (note that it will overwrite existing file)
5+
Generate changelog (note that it will overwrite existing file)
106

117
positional arguments:
12-
rev_range generates changelog for the given version (e.g: 1.5.3)
13-
or version range (e.g: 1.5.3..1.7.9)
8+
rev_range Generate changelog for the given version (e.g: 1.5.3) or version range (e.g: 1.5.3..1.7.9)
149

1510
options:
1611
-h, --help show this help message and exit
17-
--dry-run show changelog to stdout
12+
--dry-run Show the changelog to stdout
1813
--file-name FILE_NAME
19-
file name of changelog (default: 'CHANGELOG.md')
14+
File name of the changelog (default: 'CHANGELOG.md')
2015
--unreleased-version UNRELEASED_VERSION
21-
set the value for the new version (use the tag value),
22-
instead of using unreleased
23-
--incremental generates changelog from last created version, useful
24-
if the changelog has been manually modified
16+
Set the value for the new version (use the tag value), instead of using unreleased
17+
--incremental Generate changelog from last created version, useful if the changelog has been manually modified
2518
--start-rev START_REV
26-
start rev of the changelog. If not set, it will
27-
generate changelog from the start
28-
--merge-prerelease collect all changes from prereleases into next non-
29-
prerelease. If not set, it will include prereleases in
30-
the changelog
19+
Start rev of the changelog. If not set, it will generate changelog from the start
20+
--merge-prerelease Collect all changes from prereleases into next non-prerelease. If not set, it will include prereleases in the changelog
3121
--version-scheme {pep440,semver,semver2}
32-
choose version scheme
22+
Choose the version scheme
3323
--export-template EXPORT_TEMPLATE
34-
Export the changelog template into this file instead
35-
of rendering it
24+
Export the changelog template to this file instead of rendering it
3625
--template, -t TEMPLATE
37-
changelog template file name (relative to the current
38-
working directory)
26+
changelog template file name (relative to the current working directory)
3927
--extra, -e EXTRA a changelog extra variable (in the form 'key=value')
4028
--tag-format TAG_FORMAT
4129
The format of the tag, wrap around simple quotes
Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,19 @@
1-
usage: cz check [-h] [--commit-msg-file COMMIT_MSG_FILE |
2-
--rev-range REV_RANGE | -d | -m MESSAGE] [--allow-abort]
3-
[--allowed-prefixes [ALLOWED_PREFIXES ...]]
4-
[-l MESSAGE_LENGTH_LIMIT]
1+
usage: cz check [-h] [--commit-msg-file COMMIT_MSG_FILE | --rev-range REV_RANGE | -d | -m MESSAGE] [--allow-abort] [--allowed-prefixes [ALLOWED_PREFIXES ...]] [-l MESSAGE_LENGTH_LIMIT]
52

6-
validates that a commit message matches the commitizen schema
3+
Validates that a commit message matches the commitizen schema
74

85
options:
96
-h, --help show this help message and exit
107
--commit-msg-file COMMIT_MSG_FILE
11-
ask for the name of the temporal file that contains
12-
the commit message. Using it in a git hook script:
13-
MSG_FILE=$1
8+
Ask for the name of the temporal file that contains the commit message. Using it in a git hook script: MSG_FILE=$1
149
--rev-range REV_RANGE
15-
a range of git rev to check. e.g, master..HEAD
10+
A range of git rev to check. e.g, master..HEAD
1611
-d, --use-default-range
17-
check from the default branch to HEAD. e.g,
18-
refs/remotes/origin/master..HEAD
12+
Validate all the commits on the default branch up to HEAD, e.g., refs/remotes/origin/master..HEAD
1913
-m, --message MESSAGE
20-
commit message that needs to be checked
21-
--allow-abort allow empty commit messages, which typically abort a
22-
commit
14+
Only validate the given commit message
15+
--allow-abort Allow empty commit messages, which typically abort a commit
2316
--allowed-prefixes [ALLOWED_PREFIXES ...]
24-
allowed commit message prefixes. If the message starts
25-
by one of these prefixes, the message won't be checked
26-
against the regex
17+
Ignore commit messages that start with one of these prefixes
2718
-l, --message-length-limit MESSAGE_LENGTH_LIMIT
28-
length limit of the commit message; 0 for no limit
19+
Maximum length of the commit message; 0 for no limit
Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
usage: cz commit [-h] [--retry] [--no-retry] [--dry-run]
2-
[--write-message-to-file FILE_PATH] [-s] [-a] [-e]
3-
[-l MESSAGE_LENGTH_LIMIT] [--]
1+
usage: cz commit [-h] [--retry] [--no-retry] [--dry-run] [--write-message-to-file FILE_PATH] [-s] [-a] [-e] [-l MESSAGE_LENGTH_LIMIT] [--]
42

5-
create new commit
3+
Create a new commit
64

75
options:
86
-h, --help show this help message and exit
9-
--retry retry last commit
10-
--no-retry skip retry if retry_after_failure is set to true
11-
--dry-run show output to stdout, no commit, no modified files
7+
--retry Retry the last commit
8+
--no-retry Skip retry if retry_after_failure is set to true
9+
--dry-run Show output to stdout, no commit, no modified files
1210
--write-message-to-file FILE_PATH
13-
write message to file before committing (can be
14-
combined with --dry-run)
15-
-s, --signoff Deprecated, use 'cz commit -- -s' instead
16-
-a, --all Tell the command to automatically stage files that
17-
have been modified and deleted, but new files you have
18-
not told Git about are not affected.
19-
-e, --edit edit the commit message before committing
11+
Write message to file before committing (can be combined with --dry-run)
12+
-s, --signoff Deprecated, use `cz commit -- -s` instead
13+
-a, --all Automatically stage all tracked files that have been modified and deleted
14+
-e, --edit Edit the commit message before committing
2015
-l, --message-length-limit MESSAGE_LENGTH_LIMIT
21-
length limit of the commit message; 0 for no limit
22-
-- Positional arguments separator (recommended)
16+
Maximum length of the commit message; 0 for no limit
17+
-- Separator for positional arguments, e.g. `cz commit -- --allow-empty`
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
usage: cz example [-h]
22

3-
show commit example
3+
Show commit example
44

55
options:
66
-h, --help show this help message and exit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
usage: cz info [-h]
22

3-
show information about the cz
3+
Show information about the Commitizen
44

55
options:
66
-h, --help show this help message and exit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
usage: cz init [-h]
22

3-
init commitizen configuration
3+
Initialize commitizen configuration
44

55
options:
66
-h, --help show this help message and exit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
usage: cz ls [-h]
22

3-
show available commitizens
3+
Show available Commitizens
44

55
options:
66
-h, --help show this help message and exit
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
usage: cz schema [-h]
22

3-
show commit schema
3+
Show commit schema
44

55
options:
66
-h, --help show this help message and exit

0 commit comments

Comments
 (0)