Choose your fighter:
- Ruby
- Node.js
- Go
- Python
- Swift
- Scoop
- Homebrew
- Winget
- Snap
- Debian-based distro
- RPM-based distro
- Arch Linux
- Manual
gem install lefthook
Troubleshooting
If you see the error lefthook: command not found
you need to check your $PATH. Also try to restart your terminal.
Lefthook is available on NPM in the following flavors:
-
lefthook that will install the proper binary:
npm install lefthook --save-dev # or yarn: yarn add -D lefthook
-
@evilmartians/lefthook with pre-bundled binaries for all architectures:
npm install @evilmartians/lefthook --save-dev # or yarn: yarn add -D @evilmartians/lefthook
-
@evilmartians/lefthook-installer that will fetch binary file on installation:
npm install @evilmartians/lefthook-installer --save-dev # or yarn: yarn add -D @evilmartians/lefthook-installer
go get github.com/evilmartians/lefthook
You can find Python wrapper here package
python3 -m pip install --user lefthook
You can find the Swift wrapper plugin here. To utilize lefthook, include the plugin in the dependencies section of your Package.swift
:
.package(url: "https://github.com/csjones/lefthook-plugin.git", exact: "1.6.10"),
scoop install lefthook
brew install lefthook
winget install evilmartians.lefthook
snap install --classic lefthook
curl -1sLf 'https://dl.cloudsmith.io/public/evilmartians/lefthook/setup.deb.sh' | sudo -E bash
sudo apt install lefthook
See all instructions: https://cloudsmith.io/~evilmartians/repos/lefthook/setup/#formats-deb
curl -1sLf 'https://dl.cloudsmith.io/public/evilmartians/lefthook/setup.rpm.sh' | sudo -E bash
sudo yum install lefthook
See all instructions: https://cloudsmith.io/~evilmartians/repos/lefthook/setup/#repository-setup-yum
You can install lefthook package from AUR.
yay -S lefthook
Or take it from binaries and install manually.
- Download the executable for your OS and Arch
- Put the executable under the $PATH (for unix systems)
Have a question?
🧐 Check the wiki
🤔 Or start a discussion