Skip to content

Latest commit

 

History

History
149 lines (99 loc) · 3.78 KB

install.md

File metadata and controls

149 lines (99 loc) · 3.78 KB

Install lefthook

Choose your fighter:


Ruby

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.

Node.js

Lefthook is available on NPM in the following flavors:

  1. lefthook that will install the proper binary:

    npm install lefthook --save-dev
    # or yarn:
    yarn add -D lefthook
  2. @evilmartians/lefthook with pre-bundled binaries for all architectures:

    npm install @evilmartians/lefthook --save-dev
    # or yarn:
    yarn add -D @evilmartians/lefthook
  3. @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

go get github.com/evilmartians/lefthook

Python

You can find Python wrapper here package

python3 -m pip install --user lefthook

Swift

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.5.2"),

Scoop for Windowss

scoop install lefthook

Homebrew for MacOS and Linux

brew install lefthook

Winget for Windows

winget install evilmartians.lefthook

Snap for Linux

snap install --classic lefthook

APT packages for Debian/Ubuntu Linux

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

Hosted By: Cloudsmith

RPM packages for CentOS/Fedora Linux

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

Hosted By: Cloudsmith

AUR for Arch

You can install lefthook package from AUR.

yay -S lefthook

Manuall installation with prebuilt executable

Or take it from binaries and install manually.

  1. Download the executable for your OS and Arch
  2. Put the executable under the $PATH (for unix systems)

More info

Have a question?

🧐 Check the wiki

🤔 Or start a discussion