PHP
- Add the package as a dependency
composer require --dev evilmartians/lefthook
- Check that it works
vendor/bin/lefthook version
- Install the Git hooks
vendor/bin/lefthook install
After that lefthook should automatically find its path via composer exec on Git hooks.