@commitlint/cli

Lint commit messages to enforce consistent style rules

npmmacoslinuxwindows
Try with needOr install directly
Source

About

Lint your commit messages

Commands

commitlint

Examples

check if current commit message follows rules$ commitlint --edit
validate a commit message from command line$ commitlint --message 'feat: add new feature'
lint all commits in a range$ commitlint --from HEAD~5 --to HEAD
show what commit message rules are configured$ commitlint --print-config
check commit messages and fail if any are invalid$ commitlint --from origin/main