# 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
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/lefthook>
- **バージョン:** 2.1.10
- **ソース概要:** Fast and powerful Git hooks manager for any type of projects
- **ホームページ:** <https://github.com/evilmartians/lefthook>
- **リポジトリ:** <https://github.com/evilmartians/lefthook>
- **ライセンス:** MIT
- **ソースアーカイブ:** <https://github.com/evilmartians/lefthook/archive/refs/tags/v2.1.10.tar.gz>
- **最終更新:** 2026-07-26T13:41:00+02:00
- **生成日時:** 2026-08-04T22:13:35+00:00

## 実行可能ファイル

- lefthook (cli)
- lefthook (エイリアス)

## ビルド依存関係

- go

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 2.1.10
- マネージャ更新日: 2026-07-26
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/evilmartians/lefthook
- 検出された最新: v2.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 を使えるよう、パッケージメタデータはここに公開されています。



## 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
## ソースデータベース詳細

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** lefthook
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 他のパッケージマネージャ記録

- 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


## 関連リンク

- [Source-control packages](https://pkg.so/ja/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/ja/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/ja/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/ja/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://pkg.so/ja/brew/go/) - Build dependency declared by Homebrew.
- [all-repos](https://pkg.so/ja/brew/all-repos/) - Shares pkgdb curated category or tags: automation, cli, developer-tools, git, version-control.
- [libgit2](https://pkg.so/ja/brew/libgit2/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [lazygit](https://pkg.so/ja/brew/lazygit/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [pre-commit](https://pkg.so/ja/brew/pre-commit/) - Shares pkgdb curated category or tags: cli, developer-tools, git-hooks, version-control.
- [commitizen](https://pkg.so/ja/brew/commitizen/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [diff-so-fancy](https://pkg.so/ja/brew/diff-so-fancy/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [repo](https://pkg.so/ja/brew/repo/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [mergiraf](https://pkg.so/ja/brew/mergiraf/) - Shares pkgdb curated category or tags: cli, developer-tools, git, version-control.
- [lefthook](https://pkg.so/ja/npm/lefthook/) - Same normalized package name appears in another local ecosystem. Shared terms: automation, cli, developer, developer-tools, git.
- [git-pull-run](https://pkg.so/ja/npm/git-pull-run/) - Local package facts share a topical domain. Shared terms: cli, control, developer, developer-tools, git.
- [lefthook](https://pkg.so/ja/npm/lefthook/) - Same normalized package name in another local ecosystem.

## 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
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
