lefthook-freebsd-x64

The FreeBSD 64-bit binary for lefthook, git hooks manager.

MIT 163 个版本
安装
npm install lefthook-freebsd-x64
yarn add lefthook-freebsd-x64
pnpm add lefthook-freebsd-x64
bun add lefthook-freebsd-x64
README

Build Status codecov

Lefthook

A Git hooks manager for Node.js, Ruby, Python and many other types of projects.

  • Fast. It is written in Go. Can run commands in parallel.
  • Powerful. It allows to control execution and files you pass to your commands.
  • Simple. It is single dependency-free binary which can work in any environment.

📖 Introduction post

Sponsored by Evil Martians

Install

With Go (>= 1.26):

go install github.com/evilmartians/lefthook/v2@v2.1.10
  • or as a go tool
go get -tool github.com/evilmartians/lefthook/v2@v2.1.10

With NPM:

npm install lefthook --save-dev

For Ruby:

gem install lefthook

For Python:

pipx install lefthook

Installation guide with more ways to install lefthook: apt, brew, winget, and others.

Usage

Configure your hooks, install them once and forget about it: rely on the magic underneath.

TL;DR

# Configure your hooks
vim lefthook.yml

# Install them to the git project
lefthook install

# Enjoy your work with git
git add -A && git commit -m '...'

More details

Why Lefthook

  • Parallel execution

Gives you more speed. docs

pre-push:
  parallel: true
  • Flexible list of files

If you want your own list. Custom and prebuilt examples.

pre-commit:
  jobs:
    - name: lint frontend
      run: yarn eslint {staged_files}

    - name: lint backend
      run: bundle exec rubocop --force-exclusion -- {all_files}

    - name: stylelint frontend
      files: git diff --name-only HEAD @{push}
      run: yarn stylelint {files}
  • Glob and regexp filters

If you want to filter list of files. You could find more glob pattern examples here.

pre-commit:
  jobs:
    - name: lint backend
      glob: "*.rb" # glob filter
      exclude:
        - "*/application.rb"
        - "*/routes.rb"
      run: bundle exec rubocop --force-exclusion -- {all_files}
  • Execute in sub-directory

If you want to execute the commands in a relative path

pre-commit:
  jobs:
    - name: lint backend
      root: "api/" # Careful to have only trailing slash
      glob: "*.rb" # glob filter
      run: bundle exec rubocop -- {all_files}
  • Run scripts

If oneline commands are not enough, you can execute files. docs

commit-msg:
  jobs:
    - script: "template_checker"
      runner: bash
  • Tags

If you want to control a group of commands. docs

pre-push:
  jobs:
    - name: audit packages
      tags:
        - frontend
        - linters
      run: yarn lint

    - name: audit gems
      tags:
        - backend
        - security
      run: bundle audit
  • Support Docker

If you are in the Docker environment. docs

pre-commit:
  jobs:
    - script: "good_job.js"
      runner: docker run -it --rm <container_id_or_name> {cmd}
  • Local config

If you are a frontend/backend developer and want to skip unnecessary commands or override something in Docker. docs

# lefthook-local.yml
pre-push:
  exclude_tags:
    - frontend
  jobs:
    - name: audit packages
      skip: true
  • Direct control

If you want to run hooks group directly.

$ lefthook run pre-commit
  • Your own tasks

If you want to run specific group of commands directly.

fixer:
  jobs:
    - run: bundle exec rubocop --force-exclusion --safe-auto-correct -- {staged_files}
    - run: yarn eslint --fix {staged_files}
$ lefthook run fixer
  • Control output

You can control what lefthook prints with output option.

output:
  - execution
  - failure

Guides

Examples

Check examples

Articles

版本列表
2.1.10 2026-07-08
2.1.9 2026-05-29
2.1.8 2026-05-19
2.1.7 2026-05-19
2.1.6 2026-04-16
2.1.5 2026-04-06
2.1.4 2026-03-12
2.1.3 2026-03-07
2.1.2 2026-03-01
2.1.1 2026-02-12
2.1.0 2026-02-03
2.0.16 2026-01-27
2.0.15 2026-01-13
2.0.14 2026-01-12
2.0.13 2025-12-26
2.0.12 2025-12-15
2.0.11 2025-12-12
2.0.10 2025-12-12
2.0.9 2025-12-08
2.0.8 2025-12-05
2.0.7 2025-12-03
2.0.6 2025-12-03
2.0.5 2025-12-02
2.0.4 2025-11-13
2.0.3 2025-11-10
2.0.2 2025-10-29
2.0.1 2025-10-24
2.0.0 2025-10-20
1.13.6 2025-09-30
1.13.5 2025-09-29
1.13.4 2025-09-23
1.13.3 2025-09-23
1.13.2 2025-09-22
1.13.1 2025-09-17
1.13.0 2025-09-11
1.12.4 2025-09-08
1.12.3 2025-08-12
1.12.2 2025-07-11
1.12.1 2025-07-09
1.12.0 2025-07-08
1.11.16 2025-07-03
1.11.15 2025-07-03
1.11.14 2025-06-16
1.11.13 2025-05-16
1.11.12 2025-04-28
1.11.11 2025-04-21
1.11.10 2025-04-14
1.11.9 2025-04-11
1.11.8 2025-04-08
1.11.7 2025-04-07
1.11.6 2025-03-31
1.11.5 2025-03-25
1.11.4 2025-03-24
1.11.3 2025-03-07
1.11.2 2025-02-26
1.11.1 2025-02-25
1.11.0 2025-02-23
1.10.11 2025-02-21
1.10.10 2025-01-21
1.10.9 2025-01-20
1.10.8 2025-01-17
1.10.7 2025-01-15
1.10.6 2025-01-15
1.10.5 2025-01-14
1.10.4 2025-01-13
1.10.3 2025-01-10
1.10.2 2025-01-10
1.10.1 2024-12-26
1.10.0 2024-12-19
1.9.3 2024-12-18
1.9.2 2024-12-12
1.9.1 2024-12-12
1.9.0 2024-12-06
1.8.5 2024-12-02
1.8.4 2024-11-18
1.8.2 2024-10-29
1.8.1 2024-10-23
1.8.0 2024-10-22
1.7.22 2024-10-18
1.7.21 2024-10-17
1.7.18 2024-09-30
1.7.17 2024-09-26
1.7.16 2024-09-23
1.7.15 2024-09-02
1.7.14 2024-08-17
1.7.13 2024-08-16
1.7.12 2024-08-09
1.7.11 2024-07-29
1.7.10 2024-07-29
1.7.9 2024-07-26
1.7.8 2024-07-26
1.7.7 2024-07-24
1.7.6 2024-07-24
1.7.5 2024-07-22
1.7.4 2024-07-19
1.7.3 2024-07-18
1.7.2 2024-07-11
1.7.1 2024-07-08
1.7.0 2024-07-08
1.6.22 2024-07-08
1.6.21 2024-07-08
1.6.19 2024-07-08
1.6.18 2024-06-21
1.6.17 2024-06-20
1.6.16 2024-06-13
1.6.15 2024-06-03
1.6.14 2024-05-30
1.6.13 2024-05-27
1.6.12 2024-05-17
1.6.11 2024-05-13
1.6.10 2024-04-10
1.6.9 2024-04-09
1.6.8 2024-04-02
1.6.7 2024-03-15
1.6.6 2024-03-14
1.6.5 2024-03-04
1.6.4 2024-02-28
1.6.3 2024-02-27
1.6.2 2024-02-26
1.6.1 2024-01-24
1.6.0 2024-01-22
1.5.7 2024-01-17
1.5.6 2024-01-12
1.5.5 2023-11-30
1.5.4 2023-11-27
1.5.3 2023-11-22
1.5.2 2023-10-09
1.5.1 2023-10-06
1.5.0 2023-09-21
1.4.11 2023-09-13
1.4.10 2023-09-04
1.4.9 2023-08-15
1.4.8 2023-07-31
1.4.7 2023-07-24
1.4.6 2023-07-18
1.4.5 2023-07-12
1.4.4 2023-07-10
1.4.3 2023-06-19
1.4.2 2023-06-13
1.4.1 2023-05-22
1.4.0 2023-05-18
1.3.13 2023-05-11
1.3.12 2023-04-28
1.3.11 2023-04-27
1.3.10 2023-04-13
1.3.9 2023-04-04
1.3.8 2023-03-23
1.3.7 2023-03-20
1.3.6 2023-03-16
1.3.5 2023-03-15
1.3.4 2023-03-14
1.3.3 2023-03-01
1.3.2 2023-02-27
1.3.1 2023-02-27
1.3.0 2023-02-22
1.2.9 2023-02-13
1.2.8 2023-01-23
1.2.7 2023-01-10
1.2.6 2022-12-14
1.2.5 2022-12-13
1.2.4 2022-12-05
1.2.3 2022-11-30
1.2.2 2022-11-23