On this page
Overview
commitlint is a CLI and API for validating Git commit messages against configured rules. Shared configurations such as the Conventional Commits preset can enforce type(scope): subject conventions, while projects can extend and share their own rules and run validation in local Git hooks or CI.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Validate commit messages with configurable rules
The CLI checks message fields such as type, scope, and subject against configured rules, including common Conventional Commits types such as feat, fix, docs, and test.
Sources: [1]
Extend reusable shared configurations
Projects can extend packages such as @commitlint/config-conventional and can publish organization-specific shared configurations for consistent rules across repositories.
Integrate with Git hooks, CI, and programmatic APIs
commitlint can run from commit-msg hooks and CI commit-range checks, while packages such as lint, load, and read expose programmatic workflows.
Sources: [1]
Best fit
Fits release and changelog workflows that depend on structured commit metadata
It is useful when Conventional Commits feed semantic versioning, release notes, or changelog automation and malformed messages should be rejected early.
Sources: [1]
Before adoption
It validates messages rather than authoring commits
commitlint does not create commit content for contributors. Pair it with Commitizen or prompt tooling if interactive message authoring is required.
Sources: [1]
Enforce rules in CI as well as local hooks
Local hooks can be skipped or differ across developer environments, so repository-level enforcement should also validate relevant commits in CI.
Sources: [1]
Official sources
- [1]commitlint v21.2.3 README(2026-10-03)
- [2]commitlint v21.2.3 getting started(2026-10-03)
- [3]commitlint v21.2.3 repository package metadata(2026-10-03)
- [4]commitlint v21.2.3 release(2026-10-03)
- [5]commitlint MIT license(2026-10-03)
Supplemental curator note
When release automation consumes commit history, commitlint moves message conventions from human memory into an executable check. Use CI alongside local hooks when the repository needs consistent enforcement.
Try it in 3 steps
- 1
Add commitlint 21.2.3 and the Conventional config
Pin the CLI and shared configuration at the same version in a project using Node 22.12 or newer.
npm install --save-dev @commitlint/cli@21.2.3 @commitlint/config-conventional@21.2.3 - 2
Create a Conventional Commits configuration
Use an ES module config that extends the standard Conventional Commits rule set.
printf "export default { extends: ['@commitlint/config-conventional'] };\n" > commitlint.config.mjs - 3
Lint a message from stdin
Verify the CLI and configuration using only a local string without changing Git history.
printf 'feat: add search\n' | npx commitlint
Growth
Growth trends · Last 30 days
18,759 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 44
- Open PRs
- 8
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- git
- commit
- lint
- conventions
- Stars
- 18,759
- Forks
- 969
- Watchers
- 67
- Open issues
- 74
- Contributors
- 283
- Owner type
- Organization
- Primary language
- TypeScript
- License
- MIT
- Repository last updated
- Oct 3, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Appium22,040 Stars
2 shared tag(s) · 2 shared category(s) · Same language
automate end-to-end tests for Android, iOS, and desktop apps through WebDriver-compatible APIs
TypeScript - OpenComputer558 Stars
2 shared tag(s) · 2 shared category(s) · Same language
Define agents as code and operate them as versioned deployments on a managed cloud runtime
TypeScript - Allure Report5,548 Stars
2 shared tag(s) · 2 shared category(s)
turn results from multiple languages and test frameworks into unified reports with history, steps, and attachments
HTML - OpenClaw391,244 Stars
2 shared tag(s) · 1 shared category(s) · Same language
Connect a persistent assistant to channels, tools, memory, and device nodes through a local Gateway control plane
TypeScript - n8n206,530 Stars
2 shared tag(s) · 1 shared category(s) · Same language
Connect visual workflows, code, AI agents, and human approvals in one automation runtime
TypeScript - Dify157,734 Stars
2 shared tag(s) · 1 shared category(s) · Same language
design and publish AI workflows, retrieval, and agents on one platform
TypeScript
Report incorrect information
Tell us if any listing information is incorrect or outdated.