Skip to content

Meta

Tools: Lefthook for Git hooks

I want the git hook feedback loops, but I definitely don't want to bring Husky into the package dependencies. Husky was great, but it is getting a bit out of hand.

This meta-record was published on


Decision Use Lefthook

It's easy to find people that agree with Husky's bloat: Alternatives to Husky.

  • fast! written in Go :notbad:
  • maintained: 56 contributors, steady code frequency
  • great docs
  • 😵 yml config
  • 😋 run commands in parallel.

Other options considered

Just git-hooks

Possibly. See no need for Husky

But on the other I also don't need:

RED="\033[1;31m"
GREEN="\033[1;32m"
NC="\033[0m"
linter_exit_code=1
all_ts_files=$(git diff --cached --

Simple Git hooks

  • popular! used by 6K
  • 😒 built in 2021 but stale
  • 👍 simple config, json, js, or cjs
  • limited:
    • requires you to manually apply the changes to git hooks.
    • only one command per git hook.

Go back to top of the page