talira

commitlint

Lint commit messages against your team's commit convention

open sourceMITfree

commitlint checks commit messages against a convention, such as Conventional Commits through its @commitlint/config-conventional preset, so a team's history stays consistent and tools that read it (changelogs, version bumps) keep working. It runs on git's commit-msg hook, usually through Husky, to reject a bad message as it's written, and in CI to check every commit in a pull request. Rules are configured in a file, shared as npm-installed configs and extended with plugins, and an interactive prompt helps write a valid message. It ships an agent skill and instructions so coding agents read the rules, validate a message and fix it when the hook rejects it. It runs on Node.js, Bun or Deno.

Problems it solves

  • stop teammates pushing commit messages that don't follow Conventional Commits
  • reject a badly formatted commit message before the commit is made
  • check every commit message in a pull request in CI
  • make my AI coding agent write commit messages that follow our convention

Features

  • lints commit messages on the commit-msg git hook
  • CI checks for every commit in a pull request (GitHub Actions and others)
  • shareable npm configs, including a Conventional Commits preset
  • configurable rules and plugins
  • interactive prompt for writing a valid message
  • agent skill and AGENTS.md instructions for coding agents
  • Node.js, Bun and Deno

Capabilities

Has a command line toolplan not known
Takes pluginsplan not known

Alternatives

The same job

These do what commitlint does.

  1. Commitizen Enforce commit message rules, bump versions and generate changelogs
  2. pre-commit A framework for managing and maintaining multi-language pre-commit hooks.
  3. Commitizen (cz-cli) Prompt for every required commit field at commit time, the Node.js way
  4. lint-staged Run tasks like formatters and linters against files staged in Git
  5. Husky Native Git hooks for npm projects, in 2 kB with no dependencies

Compare commitlint with the top 3