{"slug": "lefthook", "name": "lefthook", "category": "git", "category_name": "Git and code hosting", "description": "", "recommenders": 4, "commenters": 6, "warners": 1, "score": 2.045, "rising": -1.31, "first": "2025-11-18", "latest": "2026-05-27", "why": "lefthook is like pre-commit, but with significantly better dependency chain.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 4, "neutral": 1, "compare": 1, "warn": 1}, "spark": [1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "lefthook is like pre-commit, but with significantly better dependency chain.", "kind": "", "icon": true, "domain": null, "github_repo": "github.com/evilmartians/lefthook", "official_url": "https://github.com/evilmartians/lefthook", "pricing": "", "aliases": ["lefthook", "Lefthook"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 765532626, "item_id": 47845789, "url": "https://news.ycombinator.com/item?id=47845789", "by": "sshine", "date": "2026-04-21", "stance": "recommend", "quote": "lefthook is like pre-commit, but with significantly better dependency chain.", "excerpt": "I handle polyglot monorepos using Nix. Because Nix is a package manager not tied to one programming language ecosystem, I can install all the tools for every language I need, and have the tooling consistent and modular, even between monorepos. For formatting I usee treefmt-nix, which quickly format all syntaxes in my repo (.nix, .rs, .md, etc.) by calling individual formatters (installed via Nix), such as rustfmt, md", "context": "", "use_case": "git hooks", "switched_from": "", "story": "Using Changesets in a polyglot monorepo"}, {"id": 745878256, "item_id": 46617391, "url": "https://news.ycombinator.com/item?id=46617391", "by": "anttiharju", "date": "2026-01-14", "stance": "recommend", "quote": "Lefthook helps a lot", "excerpt": "> i.e. the lack of a tight feedback loop. Lefthook helps a lot https://anttiharju.dev/a/1#pre-commit-hooks-are-useful Thing is that people are not willing to invest in it due to bad experiences with various git hooks, but there are ways to have it be excellent", "context": "", "use_case": "Git hooks manager", "switched_from": "", "story": "I Hate GitHub Actions with Passion"}, {"id": 741304112, "item_id": 46331507, "url": "https://news.ycombinator.com/item?id=46331507", "by": "adamcharnock", "date": "2025-12-19", "stance": "recommend", "quote": "Agreed. Also Lefthook: https://github.com/evilmartians/lefthook", "excerpt": "Agreed. Also Lefthook: https://github.com/evilmartians/lefthook", "context": "", "use_case": "", "switched_from": "", "story": "Graphite is joining Cursor"}, {"id": 735622144, "item_id": 45976384, "url": "https://news.ycombinator.com/item?id=45976384", "by": "jryio", "date": "2025-11-18", "stance": "recommend", "quote": "Why would lefthook not be a more reliable tool", "excerpt": "Why would lefthook not be a more reliable tool (in design) https://github.com/evilmartians/lefthook", "context": "", "use_case": "", "switched_from": "", "story": "Better pre-commit, re-engineered in Rust"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 750009280, "item_id": 46875580, "url": "https://news.ycombinator.com/item?id=46875580", "by": "aniforprez", "date": "2026-02-03", "stance": "warn", "quote": "Last I used it, lefthook ran on every file regardless of git status.", "excerpt": "Correct me if I'm wrong but lefthook doesn't run its hooks exclusively on the staged changes IIRC. pre-commit, and prek by extension, have a process to stash the unstaged changes using git and running the code only on the staged files. Last I used it, lefthook ran on every file regardless of git status. This annoyed me because I'd have a few stray files that were not ready to be checked in or tracked that would trigg", "context": "", "use_case": "", "switched_from": "", "story": "Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust"}]}], "who": [], "tags": [], "use_cases": ["git hooks", "git hook management", "git hooks manager"], "compared": [{"slug": "pre-commit", "name": "pre-commit", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "prek", "name": "prek", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=46873138", "title": "Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=48289950", "title": "Claude Code as a Daily Driver: Claude.md, Skills, Subagents, Plugins, and MCPs", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47845274", "title": "Using Changesets in a polyglot monorepo", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46614558", "title": "I Hate GitHub Actions with Passion", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46327206", "title": "Graphite is joining Cursor", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=45931273", "title": "Better pre-commit, re-engineered in Rust", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 1}, "2025-12": {"recommend": 1}, "2026-01": {"recommend": 1}, "2026-02": {"warn": 1, "neutral": 1}, "2026-03": {}, "2026-04": {"recommend": 1}, "2026-05": {"compare": 1}, "2026-06": {}, "2026-07": {}, "2026-08": {}, "2026-09": {}, "2026-10": {}}, "quotes": [{"id": 772687219, "item_id": 48292951, "url": "https://news.ycombinator.com/item?id=48292951", "by": "sshine", "date": "2026-05-27", "stance": "compare", "quote": "How does hk compare to lefthook?", "excerpt": "Awesome, both fnox and hk look very well-made. How does fnox compare to sops? How does hk compare to lefthook? And does hk and fnox have a similar Nix integration as lefthook-nix and sops-nix? I'm still hoping I don't need to make a better lefthook. I kind of like sops-nix, not sure what's missing, really. Maybe fnox is similarly wholesome for non-Nix users. I see that hk has a flake, so that's a good sign. https://g", "context": "", "use_case": "", "switched_from": "", "story": "Claude Code as a Daily Driver: Claude.md, Skills, Subagents, Plugins, and MCPs"}, {"id": 765532626, "item_id": 47845789, "url": "https://news.ycombinator.com/item?id=47845789", "by": "sshine", "date": "2026-04-21", "stance": "recommend", "quote": "lefthook is like pre-commit, but with significantly better dependency chain.", "excerpt": "I handle polyglot monorepos using Nix. Because Nix is a package manager not tied to one programming language ecosystem, I can install all the tools for every language I need, and have the tooling consistent and modular, even between monorepos. For formatting I usee treefmt-nix, which quickly format all syntaxes in my repo (.nix, .rs, .md, etc.) by calling individual formatters (installed via Nix), such as rustfmt, md", "context": "", "use_case": "git hooks", "switched_from": "", "story": "Using Changesets in a polyglot monorepo"}, {"id": 750013696, "item_id": 46875856, "url": "https://news.ycombinator.com/item?id=46875856", "by": "mm263", "date": "2026-02-03", "stance": "neutral", "quote": "Please look at the example that is literally on the front page of the lefthook website", "excerpt": "Please look at the example that is literally on the front page of the lefthook website: https://lefthook.dev/", "context": "", "use_case": "Git hook management", "switched_from": "", "story": "Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust"}, {"id": 750009280, "item_id": 46875580, "url": "https://news.ycombinator.com/item?id=46875580", "by": "aniforprez", "date": "2026-02-03", "stance": "warn", "quote": "Last I used it, lefthook ran on every file regardless of git status.", "excerpt": "Correct me if I'm wrong but lefthook doesn't run its hooks exclusively on the staged changes IIRC. pre-commit, and prek by extension, have a process to stash the unstaged changes using git and running the code only on the staged files. Last I used it, lefthook ran on every file regardless of git status. This annoyed me because I'd have a few stray files that were not ready to be checked in or tracked that would trigg", "context": "", "use_case": "", "switched_from": "", "story": "Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust"}, {"id": 745878256, "item_id": 46617391, "url": "https://news.ycombinator.com/item?id=46617391", "by": "anttiharju", "date": "2026-01-14", "stance": "recommend", "quote": "Lefthook helps a lot", "excerpt": "> i.e. the lack of a tight feedback loop. Lefthook helps a lot https://anttiharju.dev/a/1#pre-commit-hooks-are-useful Thing is that people are not willing to invest in it due to bad experiences with various git hooks, but there are ways to have it be excellent", "context": "", "use_case": "Git hooks manager", "switched_from": "", "story": "I Hate GitHub Actions with Passion"}, {"id": 741304112, "item_id": 46331507, "url": "https://news.ycombinator.com/item?id=46331507", "by": "adamcharnock", "date": "2025-12-19", "stance": "recommend", "quote": "Agreed. Also Lefthook: https://github.com/evilmartians/lefthook", "excerpt": "Agreed. Also Lefthook: https://github.com/evilmartians/lefthook", "context": "", "use_case": "", "switched_from": "", "story": "Graphite is joining Cursor"}, {"id": 735622144, "item_id": 45976384, "url": "https://news.ycombinator.com/item?id=45976384", "by": "jryio", "date": "2025-11-18", "stance": "recommend", "quote": "Why would lefthook not be a more reliable tool", "excerpt": "Why would lefthook not be a more reliable tool (in design) https://github.com/evilmartians/lefthook", "context": "", "use_case": "", "switched_from": "", "story": "Better pre-commit, re-engineered in Rust"}]}