`lefthook install` should recognize `lefthook-local.yml` without creating `lefthook.yml`
Author: ras0qCreated Aug 12, 2026Updated Aug 12, 2026
Labelsbug
Description
According to the documentation, lefthook-local.yml can be used without a main configuration file:
The
-localconfig can be used without a main config file.
However, when only lefthook-local.yml exists, lefthook install reports that no config was found and creates a sample lefthook.yml.
Setting LEFTHOOK_CONFIG=lefthook-local.yml is a possible workaround, but lefthook install should recognize the documented local-only configuration natively.
lefthook.yml
none
Commands to reproduce
export LEFTHOOK_VERBOSE=true- Create a repository without
lefthook.yml. - Create only
lefthook-local.yml:pre-commit: jobs: - name: check run: echo check - Run
lefthook install - Lefthook creates
lefthook.ymland install hooks
Lefthook version
2.1.10
Possible solution
If the project has lefthook-local.yml, lefthook install should install hooks without lefthook.yml
Source: evilmartians/lefthook