evilmartians

lefthook: Manage Git Hooks Across Project Languages

Lefthook is a fast Git hooks manager built in Go for Node.js, Ruby, Python, and other projects. It runs configured commands in parallel and lets teams filter files and control hook execution.

Stars
8.9k
Forks
326
Stars, last 30 days
+122
Last commit
3 days ago
Contributors
100+

Our take

Activeregular commits and releases

Health score

70/100

How it is scored
Activity
72
Community
69
Issues
60
Pull requests
78

+122 stars in the last 30 days

  • Merges more pull requests than 84% of the projects we track
  • Releases more often than 82% of the projects we track
  • More contributors than 78% of the projects we track

Lefthook is a capable, actively maintained option for teams that want configurable Git hooks across different project languages.

Good fit if

  • You want one hook manager for Node.js, Ruby, Python, or mixed-language repositories.
  • You need parallel jobs, file filtering, tags, or local overrides to tailor checks to a repository.
  • You value an MIT-licensed tool with regular commits and releases and contributions from a broad contributor base.

Look elsewhere if

  • You need checks to run outside the Git hook workflow, rather than through configured hook or task groups.
  • Your team does not want to maintain a lefthook.yml configuration and hook commands.
All health signals
Last commit2026-10-21 (3 days ago)
Commits, last 90 days62
Releases, last 12 months36 (latest v2.2.2, 2026-10-13)
Contributors100+ (top contributor: 71% of commits)
Issues closed, last 90 days18+ (typically closed in 7 days)
Pull requests merged, last 90 days76 (typically merged in 0 days)
Project age7 years

Checked on 2026-10-25 with the GitHub API.

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

9,045

Forks

338

Change since Nov 17, 2026: +5 stars·+1 forks

Overview

Lefthook is a Git hooks manager built in Go for Node.js, Ruby, Python, and other types of projects. It helps teams run checks and automation at Git events such as commits and pushes, without tying hook management to a particular project language.

Teams define hooks in a lefthook.yml file, install them in a repository, and let Lefthook run the configured commands. Its focus is on speed, flexible file selection, and control over how commands are executed.

Key Features

  • Run hook commands in parallel.
  • Select files using built-in file lists, custom commands, glob patterns, or exclusions.
  • Run commands from a specified project subdirectory.
  • Execute scripts with a chosen runner, including Bash and Docker-based commands.
  • Group jobs with tags and override or skip them with a local configuration file.
  • Run hook groups or custom task groups directly from the CLI.
  • Configure which execution and failure output Lefthook prints.

Use Cases

  • A cross-language team wants a shared way to run linters and checks before commits or pushes.
  • A repository needs separate checks for frontend and backend files, with each command receiving an appropriate file list.
  • A team wants to run project scripts or containerized checks as part of its Git workflow.
  • Developers need local hook overrides to skip or adjust checks that do not apply to their environment.

What you need

Detected in the repository

  • Go 1.27.0 or newer (from go.mod)
  • A test suite and automated checks on GitHub Actions

License in plain words

MITpermissive

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the copyright and license notice
  • Share your changes: no

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

Install through npm:

npm install lefthook --save-dev

Then configure lefthook.yml and install the hooks with lefthook install. See the README and official documentation for configuration and other installation options.

Considerations

  • Hook checks depend on the commands and scripts configured by the project, so teams need to maintain those checks and their environment requirements.
  • The project is actively developed, with regular commits and releases. Its issue tracker also shows ongoing work, so adopters should review current issues and changes when evaluating updates.
  • Lefthook's Go implementation is distributed through multiple installation methods, including npm, RubyGems, and pipx. Choose the method that fits your team's setup and confirm its runtime requirements in the installation guide.

Found this useful?

Share it with someone who would like lefthook.

Comparisons