--- id: lefthook version: "2.1.10" license: MIT license_treatment: permissive maintenance: active --- # lefthook — Git hooks manager. Fast, powerful, simple. License: permissive · Maintenance: active · Downloads: 399.8K/mo ## 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 above — verify before relying. Lefthook is a Git hooks manager that installs and runs custom commands automatically before or after Git operations, supporting parallel execution across Node.js, Ruby, and other project types. 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 pip install lefthook uv add lefthook poetry add lefthook ## Installing lefthook 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. 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 Requires Python 3.6 or later; the binary is platform-specific so installation must match your OS and architecture. 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_current - Install friction: medium - Maintenance: active - Downloads: 399.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags git hooks manager, pre-commit hook automation, git workflow automation, parallel git hooks, git commit hooks, polyglot git hooks, git hook configuration, git-automation, pre-commit, polyglot [View on SkillFed](https://skillfed.io/packages/lefthook) · [View on PyPI](https://pypi.org/project/lefthook/)