🍺 BREW Explorer

← all formulae

lefthook

brew install lefthook v2.1.9 MIT

Go-written Git hooks manager that runs pre-commit, pre-push, and other hooks in parallel with file filtering.

Why you might care

Lefthook is a single-binary, dependency-free alternative to Husky and other Node-based hook managers, making it ideal for polyglot teams (Node, Ruby, Python, etc.). It's fast because it's written in Go and can parallelize hook execution, plus it lets you control which files trigger which commands—avoiding redundant linting on unrelated changes.

Categories

Alternatives

husky pre-commit simple-git-hooks
6.1k
30-day installs · #520
14.9k
90-day · #655
29.7k
365-day · #887
8.4k
★ GitHub stars · updated 1d ago

Build dependencies

go

GitHub topics

git go golang hacktoberfest hooks lefthook manager

Links

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "husky",
    "pre-commit",
    "simple-git-hooks"
  ],
  "build_dependencies": [
    "go"
  ],
  "categories": [
    "git",
    "version-control",
    "build-system"
  ],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Fast and powerful Git hooks manager for any type of projects",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:40:56+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "lefthook",
  "github_default_branch": "master",
  "github_last_commit_at": "2026-06-19T13:17:52Z",
  "github_readme_excerpt": "![Build Status](https://github.com/evilmartians/lefthook/actions/workflows/test.yml/badge.svg?branch=master)\n[![codecov](https://codecov.io/gh/evilmartians/lefthook/graph/badge.svg?token=d93ya8MfmB)](https://codecov.io/gh/evilmartians/lefthook)\n\n# Lefthook\n\n\u003cimg align=\"right\" width=\"147\" height=\"100\" title=\"Lefthook logo\"\n     src=\"./logo_sign.svg\"\u003e\n\nA Git hooks manager for Node.js, Ruby, Python and many other types of projects.\n\n* **Fast.** It is written in Go. Can run commands in parallel.\n* **Powerful.** It allows to control execution and files you pass to your commands.\n* **Simple.** It is single dependency-free binary which can work in any environment.\n\n\ud83d\udcd6 [Introduction post](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook)\n\n\u003ca href=\"https://evilmartians.com/?utm_source=lefthook\"\u003e\n\u003cimg src=\"https://evilmartians.com/badges/sponsored-by-evil-martians.svg\" alt=\"Sponsored by Evil Martians\" width=\"100%\" height=\"54\"\u003e\u003c/a\u003e\n\n## Install\n\nWith **Go** (\u003e= 1.26):\n\n```bash\ngo install github.com/evilmartians/lefthook/v2@v2.1.9\n```\n\n* or as a go tool\n\n```bash\ngo get -tool github.com/evilmartians/lefthook/v2@v2.1.9\n```\n\nWith **NPM**:\n\n```bash\nnpm install lefthook --save-dev\n```\n\nFor **Ruby**:\n\n```bash\ngem install lefthook\n```\n\nFor **Python**:\n\n```bash\npipx install lefthook\n```\n\n**[Installation guide][installation]** with more ways to install lefthook: [apt][install-apt], [brew][install-brew], [winget][install-winget], and others.\n\n## Usage\n\nConfigure your hooks, install them once and forget about it: rely on the magic underneath.\n\n#### TL;DR\n\n```bash\n# Configure your hooks\nvim lefthook.yml\n\n# Install them to the git project\nlefthook install\n\n# Enjoy your work with git\ngit add -A \u0026\u0026 git commit -m \u0027...\u0027\n```\n\n#### More details\n\n- [**Configuration**][configuration] for `lefthook.yml` config options.\n- [**Usage**][usage] for **lefthook** CLI options, and features.\n- [**Discussions**][discussion] for questions, ideas, suggestions.",
  "github_repo": "evilmartians/lefthook",
  "github_stars": 8416,
  "github_topics": [
    "git",
    "go",
    "golang",
    "hacktoberfest",
    "hooks",
    "lefthook",
    "manager"
  ],
  "homepage": "https://github.com/evilmartians/lefthook",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 6069,
  "installs_365d": 29699,
  "installs_90d": 14879,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": "2026-06-20T23:45:23+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "lefthook",
  "oldnames": [],
  "one_liner": "Go-written Git hooks manager that runs pre-commit, pre-push, and other hooks in parallel with file filtering.",
  "optional_dependencies": [],
  "rank_30d": 520,
  "rank_365d": 887,
  "rank_90d": 655,
  "raw_hash": "81db36a71aa24235",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/l/lefthook.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "2.1.9",
  "versioned_formulae": [],
  "why_use_this": "Lefthook is a single-binary, dependency-free alternative to Husky and other Node-based hook managers, making it ideal for polyglot teams (Node, Ruby, Python, etc.). It\u0027s fast because it\u0027s written in Go and can parallelize hook execution, plus it lets you control which files trigger which commands\u2014avoiding redundant linting on unrelated changes."
}