About • Features • Quick Start • Usage • Configuration • Contributing
commit-linter is a command line interface (CLI) tool written in GO that enforces standards for git commits with elegance and precision. It validates commit messages in real-time, provides actionable feedback, and seamlessly integrates with Git to maintain consistency across your project's history.
| Category | Features |
|---|---|
| 🎯 Validation | Conventional Commits • Type/Scope checking • Length rules • Imperative mood |
| 🔧 Git Integration | Auto-hook install • Historical validation • Pre-commit blocking • Team consistency |
| 🎨 Beautiful Output | Color-coded feedback • Actionable suggestions • Validation scoring • Clean tables |
# One-liner install
go install github.com/ArjunSrivastava1/commit-linter# Validate a message
commit-lint "feat(auth): add login"
# Install Git hook (auto-validates all commits)
commit-lint --install
# Check last 3 commits
commit-lint --last --count 3# Install once, validate forever
commit-lint --install
# Now try committing:
git commit -m "bad message" # ❌ Blocked
git commit -m "feat: add feature" # ✅ Allowed# GitHub Actions
- name: Validate Commits
run: commit-lint --last-commit# Check last commit
commit-lint --last-commit
# Check range of commits
commit-lint --range HEAD~5..HEAD
# Check all commits in branch
commit-lint --branch main# .commitlint.yml
rules:
type-enum: [feat, fix, docs, style, refactor, test, chore]
subject-min-length: 10
subject-max-length: 72- Fork & clone
- Create feature branch
- Commit with Conventional Commits
- Push & open PR
See CONTRIBUTING.md for details.
GPL v2.0 - See LICENSE
Built with ❤️ by Arjun Srivastava
Report Bug • Request Feature • enva • port-scanner
