husky: Git hooks made easy
Manage Git hooks via Node.js package.
Learn more about Husky
Husky is a Node.js package that facilitates the installation and management of Git hooks. It leverages Git's core.hooksPath configuration to store hooks in a project directory rather than the standard .git/hooks location. The tool supports all 13 client-side Git hooks and runs with minimal overhead, approximately 1ms per execution. Common use cases include running linters, tests, and commit message validation before commits are made or branches are pushed.
Native Git hooks approach
Uses Git's core.hooksPath feature to store hooks within the project repository, allowing hooks to be version-controlled and shared across team members without requiring custom installation scripts.
Zero external dependencies
The package is 2 kB gzipped and contains no external dependencies, reducing installation overhead and potential compatibility issues in project environments.
Broad platform and tool support
Functions across macOS, Linux, and Windows, and integrates with Git GUIs, Node version managers, monorepos, and nested project structures without requiring special configuration.
// .husky/pre-commit
import { execSync } from 'child_process';
try {
execSync('npm run lint', { stdio: 'inherit' });
execSync('npm test', { stdio: 'inherit' });
} catch (error) {
console.error('Pre-commit checks failed');
process.exit(1);
}Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
GoogleTest
xUnit-based C++ testing framework with integrated mocking.
Instaloader
Python CLI for downloading Instagram posts, stories, profiles, and metadata.
yt-dlp
Python CLI for downloading audio/video from thousands of websites, fork of youtube-dl.
gogcli
Command-line interface for Gmail, Calendar, Drive, Contacts, and other Google services with JSON output.
Lighthouse
Open-source tool that analyzes web pages for performance, accessibility, and SEO, generating actionable reports.
Related Reading
Guides and comparisons from the Greptile content library
API Security: What It Is, Why It Matters, and 7 Best Practices for 2026
What API security is, the OWASP API Security Top 10 risks with real examples from open source PRs, seven best practices to start with, and how to test your APIs with static scanning, dynamic testing, and runtime validation.
What is agentic coding? Benefits, risks, and best tools to consider
What engineering leaders need to know about agentic coding: how it differs from AI coding and vibe coding, how it works, the benefits and risks, and the tools worth evaluating.
What Is Code Review? (And How to Keep It From Becoming the Bottleneck)
What code review is, how traditional, automated, and AI code review differ, and why review is now the bottleneck as AI writes more code. Plus how to pick a code review tool that catches real bugs.
Automated Code Review: How It Works & Best Tools [2026]
What automated code review is, how it differs from traditional and AI code review, the six types of code review automation tools, and why linters and SAST alone are no longer enough as agentic coding grows.