talira

Lefthook

Fast and powerful Git hooks manager for any type of projects.

open sourceMITself-hostablefree

Lefthook is a Git hooks manager from Evil Martians, a single dependency-free Go binary configured with lefthook.yml. It runs hook commands in parallel, passes only the relevant files (staged, pushed, or glob filtered), and installs via Go, npm, Ruby gems, Python, Homebrew, apt and others.

Ways to install

Problems it solves

  • our git hooks run linters one after another and commits take forever
  • husky needs Node, but our project is Ruby or Go
  • run eslint only on the staged files at commit time
  • version git hooks in the repo and install them for everyone
  • run several checks in parallel before push
  • single binary hook manager that works in any language project
  • skip specific hooks in CI or for certain branches
  • git hooks setup that installs through npm, gem or pip, whatever the project uses

Features

  • parallel execution
  • staged/pushed file lists
  • glob filters
  • lefthook.yml
  • single binary
  • npm/gem/pip/go installs

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what Lefthook does.

  1. pre-commit A framework for managing and maintaining multi-language pre-commit hooks.
  2. Husky Native Git hooks for npm projects, in 2 kB with no dependencies

Compare Lefthook with the top 3