A powerful Git commit quality linter that enforces semantic commit conventions with intelligent suggestions and team collaboration features.
- π Semantic Commit Validation - Enforces conventional commit format
- πͺ Git Hook Integration - Automatic validation on commit
- π¨ Interactive Builder - Guided commit message creation
- π‘ Smart Suggestions - Intelligent commit message fixes
- π Team Analytics - Repository commit statistics
- βοΈ Configurable Rules - Customize for your team
- π CI/CD Ready - Validate commits in pipelines
- π Commit Search - Find commits by message, type, or author
# Install globally
npm install -g commitrix
# Initialize in your project
commitrix init
# Install git hooks (auto-runs on npm install)
commitrix install# β Invalid commit gets rejected
$ git commit -m "fix bug"
β Commit message issues:
β’ Must start with: feat, fix, docs, style, refactor, test, chore
π‘ Suggested fix:
fix: bug
# β
Valid commit passes
$ git commit -m "fix: resolve authentication timeout"
β
Commit message looks good!# Lint a commit message
commitrix "feat: add user authentication"
# Interactive commit builder
commitrix build
# Get suggestions for invalid commits
commitrix suggest "fix bug"
# View repository statistics
commitrix stats
# Search commit messages
commitrix search "authentication"
# Search by type and author
commitrix search "bug" --type fix --author john
# Validate recent commits (CI/CD)
commitrix validate --count 10Create .commitrix.json in your project root:
{
"types": ["feat", "fix", "docs", "style", "refactor", "test", "chore"],
"maxLength": 72,
"minLength": 10,
"scopes": ["api", "ui", "docs"],
"enforceScope": false
}| Command | Description |
|---|---|
commitrix <message> |
Lint commit message |
commitrix build |
Interactive commit builder |
commitrix install |
Install git hooks |
commitrix init |
Initialize project |
commitrix stats |
Show commit statistics |
commitrix suggest <message> |
Get suggestions |
commitrix validate |
Validate recent commits |
commitrix check |
Check project setup |
commitrix config [key] [value] |
Show/set configuration |
commitrix template --type <type> |
Generate commit template |
commitrix history --count <n> |
Analyze commit history |
commitrix help |
Show help information |
commitrix lint <message> |
Lint specific message |
commitrix fix <message> |
Auto-fix commit message |
commitrix reset |
Reset config to defaults |
commitrix doctor |
Run health check on setup |
commitrix scan --count <n> |
Scan repository for issues |
commitrix benchmark |
Run performance benchmark |
commitrix report --format <fmt> |
Generate quality report |
commitrix search <query> |
Search commit messages |
$ commitrix doctor
π©Ί Running Commitrix Health Check...
β
Git repository detected
β
Configuration file found
β
Git hook installed
π Health check complete: 0 issue(s) found$ commitrix scan --count 20
π Scanning last 20 commits...
π Scan Results:
β
Valid commits: 18
β Invalid commits: 2
π Quality score: 90%$ commitrix benchmark
β‘ Running Commitrix Performance Benchmark...
π Benchmark Results:
π Average per lint: 0.085ms
π Throughput: 11,811 lints/second$ commitrix search "auth"
π Found 3 matching commits:
a1b2c3d [feat] feat: add user authentication
e4f5g6h [fix] fix: resolve auth token expiry
i7j8k9l [docs] docs: update auth documentation
π Search completed: 3 results
$ commitrix search "bug" --type fix --count 10
π Found 2 matching commits:
x1y2z3a [fix] fix: resolve login bug
b4c5d6e [fix] fix: fix memory leak bug
π Search completed: 2 results$ commitrix report
π Commit Quality Report
π Quality Score: 96%
β
Valid: 26 | β Invalid: 1
π₯ Authors: 2
π·οΈ Top Types: chore(5), fix(6), feat(8)Add to your GitHub Actions workflow:
- name: Validate Commits
run: npx commitrix validate --count 10# Clone repository
git clone https://github.com/zmelliti/commitrix.git
cd commitrix
# Install dependencies
npm install
# Run tests
npm test
# Test locally
node src/index.js "feat: test message"Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
MIT Β© ZMelliti
Made with β€οΈ for the community by Zied MELLITI