Zero-dependency Git metadata validation. Engineered for microsecond CI performance.
Enforce Conventional Commits, branch naming policies, and PR titles with native Node.js 24+ type-stripping speed. Pure built-ins, zero transitive attack surface, SLSA Level 3 provenance.
Pure Node.js built-ins. Zero transitive dependency attack surface.
Native Node 24+ type-stripping execution without transpilation overhead.
100% SHA-pinned workflows with OpenSSF & Zizmor security audits.
Executes pure TypeScript directly via built-in experimental-strip-types.
Test your Git metadata rules live in the browser.
Evaluate commit messages, branch patterns, and semantic release recommendations in real time with the pure client-side core engine.
Live Metadata Inspector
Test commit messages, branch rules, and live package.json configurations in real-time.
type(scope): subject45 / 100 charsEngineered for microsecond execution and zero bloat.
Why install dozens of transitive packages just to validate a string? git-hygiene is built purely on Node.js built-in APIs.
| Engineering Metric | git-hygiene (Native) | Husky + Commitlint (Traditional) |
|---|---|---|
| Cold Startup Latency | < 5 ms | ~220 ms |
| Runtime Dependencies | 0 packages | 38+ packages |
| Supply Chain Security | SLSA Level 3 | Unverified |
| Multi-Registry Distribution | NPM ยท JSR ยท Action | NPM only |
Everything you need for strict, automated Git hygiene.
Unified Metadata Engine
Define your naming rules once in package.json. Simultaneously validate local git commit messages, pre-push branch names, and remote GitHub pull requests.
Instant Native Execution
Leverages Node.js 24+ type-stripping (node --experimental-strip-types). Microsecond cold starts without heavy CLI frameworks like yargs or commander.
Smart Semantic Bumping
Inspects commit patterns to automatically recommend semantic version increments (major, minor, patch) with machine-readable JSON outputs for release bots.
Commitlint Compatibility
Seamlessly extends @commitlint/config-conventional. Reuse your existing team conventions with zero migration friction.
Integrates in seconds into your existing hooks & CI.
Switch between Lefthook, Husky, or GitHub Actions to see the exact drop-in configuration.
Lefthook Integration
Fast parallel git hooks with native pre-commit and pre-push validation.
package.json custom settings# lefthook.yml
commit-msg:
commands:
hygiene:
run: npx @chitrank2050/git-hygiene commit {1}
pre-push:
commands:
hygiene:
run: npx @chitrank2050/git-hygiene branchDeclarative CLI config or headless programmatic library.
Define rules in package.json for zero-config CLI enforcement, or import the standalone core engine directly into your custom CI tools.
{
"git-hygiene": {
"extends": ["@commitlint/config-conventional"],
"types": [
"feat", "fix", "chore", "docs",
"style", "refactor", "perf", "test",
"build", "ci", "revert"
],
"ignoreBranches": ["main", "master", "develop"],
"maxHeaderLength": 100,
"allowEmptyScope": false,
"rules": {
"header-max-length": [2, "always", 100]
}
}
}Seamlessly extends @commitlint/config-conventional with zero extra configuration. Custom types, branch filters, and scope rules merge automatically.
import {
validateCommit,
validateBranch,
getRecommendedBump
} from '@chitrank2050/git-hygiene-core';
// 1. Validate Commit Message
const commit = await validateCommit('feat(api): add webhook support');
console.log(commit.valid); // true
// 2. Validate Git Branch
const branch = await validateBranch('feat/webhook-retry-policy');
console.log(branch.valid); // true
// 3. Recommended Release Increment
const bump = await getRecommendedBump();
console.log(bump.releaseType); // Derived from repository historyMulti-registry distribution across Node, Deno, and GitHub Actions.
@chitrank2050/git-hygiene
Standard CLI runner for local git hooks (Lefthook, Husky) and pre-push checks.
@chitrank2050/git-hygiene
TypeScript-native package with zero build step for Deno and Node 24+ runtimes.
chitranklabs/git-hygiene
Automated PR title & branch validator with semantic release bump outputs.
@chitrank2050/git-hygiene-core
Programmatic TypeScript API for custom CI pipelines and internal developer tooling.