lefthook
Git hooks manager. Fast, powerful, simple.
Decision gist · record as of 2026-08-14
Yes, if you need a lightweight, language-agnostic Git hooks manager. Active maintenance, no runtime dependencies, permissive MIT license, and no known vulnerabilities make it low-risk. Medium install friction from platform-specific wheels is a minor trade-off for a single self-contained binary. Best suited for teams wanting to standardize pre-commit checks across polyglot codebases without heavyweight frameworks.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later; the binary is platform-specific so installation must match your OS and architecture.
- Medium install friction due to platform-specific binary wheels (macOS x86_64/arm64, Linux x86_64/aarch64, Windows amd64/arm64), but the package itself has no runtime dependencies and maintenance is active with a recent release.
License · maintenance · safety
MIT (permissive) — MIT license is permissive, allowing use in commercial and private projects with minimal restrictions—you need only retain the license notice.
last release 2026-07-08 (37 days) · last repo commit 2026-08-03 · 8,650 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 399,753 downloads/mo, #6,944 on PyPI
Alternatives
Verify before relying
pip install lefthook
# Create lefthook.yml in your repo with hook configuration
lefthook install
# Hooks now run automatically on git operations- Whether the package can run hooks for languages other than Node.js and Ruby without additional setup.
- Performance characteristics and actual parallelization behavior compared to other Git hook managers.
- Whether configuration can be shared across team members without environment-specific tweaks.
What it is and what it does
Lefthook is a Git hooks manager written in Go that runs as a single binary, installed via pip as a platform-specific wheel. It lets you define custom commands to run before or after Git operations (commit, push, etc.) in a YAML configuration file, then installs those hooks into your repository's `.git/hooks` directory. The manager supports parallel execution of commands and works across polyglot projects—Node.js, Ruby, and others—without requiring language-specific hook frameworks.
You configure hooks once in `lefthook.yml`, run `lefthook install`, and the hooks execute automatically on each Git operation. The package has no Python runtime dependencies; it's a thin wrapper around the Go binary, which handles all the hook management and execution logic. This makes it lightweight and portable across teams and CI environments.
Use it for
- Run linters and formatters automatically before commit to enforce code style across a team.
- Execute tests before push to prevent broken code from reaching the repository.
- Validate commit messages against a standard format before allowing commits.
- Run security checks or dependency audits as part of the pre-commit workflow.
- Coordinate multiple checks (lint, test, type-check) in parallel to speed up the commit process.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need a lightweight, language-agnostic Git hooks manager.
Active maintenance, no runtime dependencies, permissive MIT license, and no known vulnerabilities make it low-risk. Medium install friction from platform-specific wheels is a minor trade-off for a single self-contained binary. Best suited for teams wanting to standardize pre-commit checks across polyglot codebases without heavyweight frameworks.
Install
lefthook on PyPI
Before you install
Medium install friction due to platform-specific binary wheels (macOS x86_64/arm64, Linux x86_64/aarch64, Windows amd64/arm64), but the package itself has no runtime dependencies and maintenance is active with a recent release.
Requires Python 3.6 or later; the binary is platform-specific so installation must match your OS and architecture.
License in practice
MIT license is permissive, allowing use in commercial and private projects with minimal restrictions—you need only retain the license notice.
Quickstart
pip install lefthook
# Create lefthook.yml in your repo with hook configuration
lefthook install
# Hooks now run automatically on git operations
Verify before relying
- Whether the package can run hooks for languages other than Node.js and Ruby without additional setup.
- Performance characteristics and actual parallelization behavior compared to other Git hook managers.
- Whether configuration can be shared across team members without environment-specific tweaks.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 37 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 399,753 / month, #6,944 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Operating System :: OS IndependentTopic :: Software Development :: Version Control :: Git |
Evidence: lefthook-2.1.10-py3-none-macosx_10_15_x86_64.whl; lefthook-2.1.10-py3-none-macosx_11_0_arm64.whl; lefthook-2.1.10-py3-none-manylinux_2_17_aarch64.whl; lefthook-2.1.10-py3-none-manylinux_2_17_x86_64.whl; lefthook-2.1.10-py3-none-win_amd64.whl; lefthook-2.1.10-py3-none-win_arm64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “git hooks manager”
- lefthookLefthook is a Git hooks manager that installs and runs custom…
- prekprek is a Git hook manager written in Rust that runs hooks before…
- pre-commitpre-commit is a framework for installing and running git hooks…
Give your agent the search over MCP, or paste the wish link into any chat.
More Git packages
A Poetry plugin that automatically derives and injects version numbers from version control tags into your project during builds, using Dunamai to support multiple VCS systems.
Install it if you use Poetry 1.2.0+ and want to eliminate manual version management in your build workflow.
Automatically determines your Python package's version from Git or Mercurial tags and writes it to your build system, with customizable version formatting and optional runtime file generation.
Converts written-out number words (like "twenty one") into numeric digits (21), supporting positive integers and decimals up to 999,999,999,999.
No—install only if you have a legacy codebase already using it.
Mergify CLI is a command-line tool for managing stacked pull requests, merge queues, CI test results, and scheduled freezes on GitHub, distributed as a self-contained binary with no runtime dependencies.
Provides HTTP NTLM authentication for the requests library, enabling clients to authenticate against NTLM-protected servers and proxies.
Adds NTLM authentication support to the requests library, enabling HTTP requests to servers and proxies that require NTLM challenge-response authentication.
However, the 443-day gap since last release and aging maintenance status mean you should verify compatibility with your current dependency versions and be prepared to…
See also prek · actionlint-py · ick · pre-commit · pre-commit-hooks · lintro · nodeenv · polyglot · uv-sort · mkdocs-simple-hooks