commitlint
commitlint is a pre-commit hook designed to lint your commit messages according to the Conventional Commits standard.
What it is and what it does
Commitlint is a linter that validates commit messages conform to the Conventional Commits standard, a specification for structuring commit messages with type, scope, and description. It integrates into Git workflows as a pre-commit hook (via the pre-commit framework) or as a GitHub Action, catching non-compliant messages before they enter the repository.
The tool is designed for teams that want to enforce consistent commit message style automatically. It runs with zero runtime dependencies and supports Python 3.10 and later. Configuration is minimal—you either add it to a pre-commit config file or include it in a GitHub workflow—and it can optionally check header length and fail the commit or workflow step if violations are found.
Use it for:
- Enforce Conventional Commits in team repositories to keep commit history readable and enable automated changelog generation.
- Integrate into GitHub Actions workflows to validate all incoming pull requests and pushes without local setup.
- Use as a pre-commit hook to catch commit message violations before they reach the repository, blocking non-compliant commits locally.
- Maintain consistent commit message format across multiple projects by standardizing on Conventional Commits.
- Prevent commits starting with '#' or other non-standard patterns from entering the codebase.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Lints commit messages against the Conventional Commits standard, enforcing consistent message format in Git repositories via pre-commit hooks or GitHub Actions.
Yes, if you use Conventional Commits or want to adopt them. The package is actively maintained, has no dependencies, installs easily, and integrates seamlessly into pre-commit or GitHub Actions workflows. The GPL-3.0 license is a consideration for proprietary codebases; verify compatibility with your project's licensing model before adopting.
Install
commitlint on PyPI
pip
pip install commitlintuv
uv add commitlintpoetry
poetry add commitlintInstalling commitlint
Before you install
Low install friction with no runtime dependencies. Actively maintained with recent releases and a live repository; supports modern Python versions (3.10–3.14).
License in practice
Licensed under GPL-3.0 (copyleft). Use in proprietary projects requires careful review; derivative works and distributions must also be GPL-3.0.
Quickstart
# Pre-commit hook setup
# Add to .pre-commit-config.yaml:
repos:
- repo: https://github.com/opensource-nepal/commitlint
rev: v1.3.0
hooks:
- id: commitlint
# Then run:
pre-commit install --hook-type commit-msg
Requires pre-commit framework to be installed and initialized in your repository; the commit-msg hook type must be explicitly installed.
Verify before relying
- Whether the package can be used standalone from the CLI without pre-commit or GitHub Actions integration.
- Performance characteristics when linting large numbers of commits or in high-volume CI/CD pipelines.
- Customization options for Conventional Commits rules beyond the standard specification.
Package facts
| License | GPL-3.0 (copyleft) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 78,788/month — #14,407 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: commitlint-2.0.0-py3-none-any.whl
Keywords: commitlint, commit lint, python commitlint, conventional commit, conventional commit message, python commit, github actions, pre-commit
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
actionlint-pyactionlint-py provides a pip-installable…
permissive · top 15,000 on PyPI
commitizenCommitizen enforces standardized commit…
permissive · top 5,000 on PyPI
conventional-pre-commitA pre-commit hook that validates git commit…
permissive · top 15,000 on PyPI
commit-checkValidates Git commit messages, branch names,…
permissive · top 15,000 on PyPI
github-action-utilsProvides Python functions to invoke GitHub…
permissive · top 5,000 on PyPI
gitlint-coreLints Git commit messages against configurable…
permissive · top 5,000 on PyPI
ansible-lintansible-lint checks Ansible playbooks and roles…
copyleft · top 5,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
git-cliffgit-cliff generates changelog files from Git…
unclear · top 15,000 on PyPI
prekprek is a Git hook manager written in Rust that…
permissive · top 1,000 on PyPI