# lefthook を Homebrew, apk, MacPorts, Nix, scoop, winget でインストール

lefthook のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:lefthook
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install lefthook
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install lefthook
```

  証拠: MacPorts ports tree: devel/lefthook/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add lefthook
```

  証拠: Alpine Linux edge package indexes: lefthook from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#lefthook
```

  証拠: nixpkgs package indexes: pkgs/by-name/le/lefthook/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Scoop (92%):

```sh
scoop install main/lefthook
```

  証拠: Scoop official bucket manifest trees: bucket/lefthook.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id evilmartians.lefthook -e
```

  証拠: Windows Package Manager source index: evilmartians.lefthook from https://cdn.winget.microsoft.com/cache/source.msix

## パッケージ情報

- **パッケージキー:** brew:lefthook
- **パッケージマネージャ:** Homebrew
- **バージョン:** 2.1.10
- **ソース概要:** Fast and powerful Git hooks manager for any type of projects
- **ホームページ:** <https://github.com/evilmartians/lefthook>
- **リポジトリ:** <https://github.com/evilmartians/lefthook>
- **最終更新:** 2026-07-26T13:41:00+02:00
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- lefthook (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 2.1.10
## プロジェクトの歴史と使われ方

Lefthook is Evil Martians' Git hooks manager, packaged as a fast Go binary for teams that want one hook configuration across JavaScript, Ruby, Python, Go, and mixed-language repositories.

### プロジェクトの歴史

Evil Martians introduced Lefthook publicly in 2019 as part of a developer-experience workflow around Git hooks, CI, and test automation. The project's official materials describe it as a Git hooks manager for Node.js, Ruby, Python, and many other project types, with speed from Go and parallel command execution.

By 2024 Evil Martians described Lefthook as having grown from a wrapper around custom Git hook scripts into a broader automation tool for local development routines. The docs centered the normal workflow around creating `lefthook.yml` and running `lefthook install`, which writes hook shims under `.git/hooks/`.

### 採用の歴史

Evil Martians' 2019 launch material named Discourse, Logux, and OpenStax as adopters, which placed Lefthook in the practical Git-hook-manager niche rather than as a toy demo. Later official pages emphasized package-manager installation through project ecosystems and system package managers, including Homebrew, npm, RubyGems, winget, yum, apt, apk, and Scoop.

### 使われ方

Package users usually install the `lefthook` binary, commit `lefthook.yml`, run `lefthook install`, and let Git invoke Lefthook on events such as pre-commit, pre-push, or commit-msg. A common package-nerd use is replacing language-specific hook wrappers with a single binary that can dispatch linters, formatters, tests, and custom scripts in parallel.

### パッケージ好きにとっての重要性

Lefthook matters in package-manager culture because it sits at the boundary between Git, local automation, and language ecosystems: it is distributed as a native CLI while still fitting naturally into npm, Ruby, Python, and Homebrew workflows. Its appeal is the small, boring promise package nerds like: one config file, one binary, fewer per-language hook stacks.

### タイムライン

- 2019-07-10: Evil Martians published an early Lefthook workflow article with Crystalball and Git automation.
- 2019-07-30: Evil Martians published the main Lefthook introduction article.
- 2019-08-28: Evil Martians described using Lefthook in documentation automation workflows.
- 2024-01-18: Evil Martians described Lefthook's evolution beyond a simple Git-hook script wrapper.

### Related projects

- Related Git-hook tools include Husky, pre-commit, lint-staged, Overcommit, and language-specific package scripts. Evil Martians' surrounding open-source ecosystem also includes projects such as AnyCable, imgproxy, PostCSS-related tooling, and Crystalball.

### ソース

- <https://evilmartians.com/chronicles/5-cool-and-surprising-ways-to-configure-lefthook-for-automation-joy>
- <https://evilmartians.com/chronicles/lefthook-crystalball-and-git-magic>
- <https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape>
- <https://evilmartians.com/opensource/lefthook>
- <https://github.com/evilmartians/lefthook>
- <https://lefthook.dev/>


## セキュリティノート

lefthook に一致するローカルシークレット処理マニフェストは見つかりませんでした。将来の対応で安定したパッケージ URL を使えるよう、Nucleus パッケージメタデータはここに公開されています。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: lefthook.yml, lefthook-local.yml
## 他のパッケージマネージャ記録

- Nix - lefthook: normalized package name match | nixpkgs package indexes: pkgs/by-name/le/lefthook/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - lefthook - 2.1.9-r1: normalized package name match | Alpine Linux edge package indexes: lefthook from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Fast and powerful Git hooks manager | https://github.com/evilmartians/lefthook
- apk - lefthook-doc - 2.1.9-r1: normalized package name match | Alpine Linux edge package indexes: lefthook-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Fast and powerful Git hooks manager (documentation) | https://github.com/evilmartians/lefthook
- MacPorts - lefthook: normalized package name match | MacPorts ports tree: devel/lefthook/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/lefthook: normalized package name match | Scoop official bucket manifest trees: bucket/lefthook.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - evilmartians.lefthook: normalized package name match | Windows Package Manager source index: evilmartians.lefthook from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/lefthook.yml](https://github.com/mxcl/pkgdb/blob/main/combined/lefthook.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
