#1489·lefthook

`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 -local config 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

bash
export LEFTHOOK_VERBOSE=true
  1. Create a repository without lefthook.yml.
  2. Create only lefthook-local.yml:
    yaml
    pre-commit:
        jobs:
            - name: check
              run: echo check
  3. Run lefthook install
  4. Lefthook creates lefthook.yml and install hooks

Lefthook version

2.1.10

Possible solution

If the project has lefthook-local.yml, lefthook install should install hooks without lefthook.yml