A lightweight, repo-local commit message linter for Git. Enforce Conventional Commits rules for one repository without affecting others, with configurable scopes and quick CI feedback.
commitlint-local inspects staged commit messages from a local repo and applies Conventional Commits heuristics. It ships as a Python CLI and a pre-commit hook. Unlike broad tooling, it targets one repository, reads a local .commitlintrc, and prints actionable fixes.
- Enforce Conventional Commits:
<type>[optional scope]: <description> - Configured via
.commitlintrcin the repo root - Pre-commit hook installer:
.git/hooks/commit-msg - Quiet mode and verbose mode for CI or interactive use
- Exits non-zero for invalid commits without blocking valid ones
- Repo-local: configuration is discovered from the repo being committed into
python3 -m pip install git+<your-local-path>/commitlint-local.git
pip install .commitlint validate "feat(repo): add help output"
commitlint validate --config .commitlintrc_ci "fix: edge case"
commitlint install-hookcommitlint-local/
├── README.md
├── pyproject.toml
├── .gitignore
├── LICENSE
├── commitlint_local/
│ └── cli.py
└── tests/
└── test_cli.py
commitlint, conventional commits, git hook, local, ci, cli