CLI reference¶
Generated from commit-check --help. The CLI is also available as cchk.
usage: commit-check [-h] [-v] [-c CONFIG] [-m] [-b] [-n] [-e] [-d]
[--no-force-push] [--format FORMAT] [--no-banner]
[--compact] [--conventional-commits BOOL]
[--subject-capitalized BOOL] [--subject-imperative BOOL]
[--subject-max-length INT] [--subject-min-length INT]
[--allow-commit-types LIST] [--allow-merge-commits BOOL]
[--allow-revert-commits BOOL] [--allow-empty-commits BOOL]
[--allow-fixup-commits BOOL] [--allow-wip-commits BOOL]
[--require-body BOOL] [--require-signed-off-by BOOL]
[--ignore-authors LIST] [--ai-attribution POLICY]
[--author-email-pattern REGEX]
[--author-name-pattern REGEX] [--conventional-branch BOOL]
[--allow-branch-types LIST] [--allow-branch-names LIST]
[--require-rebase-target BRANCH]
[--branch-ignore-authors LIST]
[commit_msg_file]
Check commit message, branch name, author name, email, and more.
positional arguments:
commit_msg_file path to commit message file (positional argument for
pre-commit compatibility)
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-c CONFIG, --config CONFIG
path to config file (cchk.toml or commit-check.toml).
If not specified, searches for config in: cchk.toml,
commit-check.toml, .github/cchk.toml, .github/commit-
check.toml
check types:
Specify which validation checks to run
-m, --message validate commit message (file path can be provided as
positional argument for pre-commit compatibility)
-b, --branch check current git branch name
-n, --author-name check git author name
-e, --author-email check git author email
-d, --dry-run perform a dry run without failing (always returns 0)
--no-force-push check that no force push is being performed (uses pre-
push hook stdin when available, otherwise checks the
current branch against its upstream)
--format FORMAT output format: 'text' (default) for human-readable
output, 'json' for machine-readable JSON (useful for
AI agents and tooling)
--no-banner suppress the ASCII art banner on failure
--compact show compact one-line-per-failure output (implies
--no-banner)
commit message options:
Configuration options for --message validation
--conventional-commits BOOL
enforce conventional commits format (true/false)
--subject-capitalized BOOL
require subject to start with capital letter
(true/false)
--subject-imperative BOOL
require subject to use imperative mood (true/false)
--subject-max-length INT
maximum length of commit subject
--subject-min-length INT
minimum length of commit subject
--allow-commit-types LIST
comma-separated list of allowed commit types (e.g.,
feat,fix,docs)
--allow-merge-commits BOOL
allow merge commits (true/false)
--allow-revert-commits BOOL
allow revert commits (true/false)
--allow-empty-commits BOOL
allow empty commit messages (true/false)
--allow-fixup-commits BOOL
allow fixup commits (true/false)
--allow-wip-commits BOOL
allow WIP commits (true/false)
--require-body BOOL require commit body (true/false)
--require-signed-off-by BOOL
require 'Signed-off-by' trailer (true/false)
--ignore-authors LIST
comma-separated list of authors to ignore for commit
checks
--ai-attribution POLICY
AI attribution policy: ignore (default) or forbid.
'forbid' rejects commits with known AI tool
signatures.
--author-email-pattern REGEX
regex to check author email (requires --author-email)
--author-name-pattern REGEX
regex to check author name (requires --author-name)
branch options:
Configuration options for --branch validation
--conventional-branch BOOL
enforce conventional branch naming (true/false)
--allow-branch-types LIST
comma-separated list of allowed branch types (e.g.,
feature,bugfix,hotfix)
--allow-branch-names LIST
comma-separated list of additional allowed branch
names
--require-rebase-target BRANCH
target branch for rebase validation
--branch-ignore-authors LIST
comma-separated list of authors to ignore for branch
checks
See also¶
- Configuration — every option, with the environment variable and TOML key that set it.
- Rules — which flag activates which rule.