# commitlint

> Lint commit messages

- Type: agent or tool
- Field: Developer Tools
- Repository: https://github.com/conventional-changelog/commitlint
- GitHub stars: 18846
- Licence: MIT
- Language: TypeScript
- Last push: 2026-11-23
- Page: https://imutechz.in/agents/commitlint

## What it is
commitlint is a tool that checks whether commit messages follow the conventional commit format, such as type(scope?): subject. It is aimed at developers and teams who want consistent commit history, and it can run locally on commit or during CI builds. Configuration is picked up from files like .commitlintrc or commitlint.config.js, and shared configs can be installed via npm.

## Features
- Checks commit messages against the conventional commit format
- Config loaded from .commitlintrc, commitlint.config.js, or package.json
- Shared configurations installable via npm
- CLI plus a programmatic API for linting and reading commits
- Commitizen adapter and prompt tools included
- Supports multiple scopes with /, \ and , delimiters

## Best for
- Enforcing conventional commit messages on commit
- Linting commit messages in CI builds
- Sharing commit rules across projects via npm configs
- Feeding conventional-changelog generation

## Pros
- Configuration can be shared via npm
- Integrates with conventional-changelog
- Configurable rules and custom types
- Considered stable and used as a development tool

## Cons
- Requires Node.js LTS = 22.12.0
- Requires git = 2.13.2
- No promised timely patch releases for older versions

## Install
```
npm install --save-dev @commitlint/cli
```

## Usage
```
type(scope?): subject
```

Tags: commitlint, commit-messages, conventional-commits, linting, git, cli, changelog, npm
