Gathering detailed insights and metrics for lefthook-linux-x64
Gathering detailed insights and metrics for lefthook-linux-x64
Gathering detailed insights and metrics for lefthook-linux-x64
Gathering detailed insights and metrics for lefthook-linux-x64
Fast and powerful Git hooks manager for any type of projects.
npm install lefthook-linux-x64
Typescript
Module System
Node Version
NPM Version
99.7
Supply Chain
92.7
Quality
93.4
Maintenance
100
Vulnerability
100
License
Go (91.46%)
Ruby (4.06%)
JavaScript (1.84%)
Shell (1.38%)
Python (0.76%)
Makefile (0.51%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
10,621,814
Last Day
22,283
Last Week
306,998
Last Month
1,174,063
Last Year
8,166,525
MIT License
5,411 Stars
919 Commits
221 Forks
28 Watchers
5 Branches
139 Contributors
Updated on Feb 18, 2025
Latest Version
1.10.10
Package Id
lefthook-linux-x64@1.10.10
Unpacked Size
11.79 MB
Size
4.67 MB
File Count
3
NPM Version
10.8.2
Node Version
20.18.1
Published on
Jan 21, 2025
Cumulative downloads
Total Downloads
Last Day
33.4%
22,283
Compared to previous day
Last Week
4.6%
306,998
Compared to previous week
Last Month
43.2%
1,174,063
Compared to previous month
Last Year
277.3%
8,166,525
Compared to previous year
No dependencies detected.
The fastest polyglot Git hooks manager out there
A Git hooks manager for Node.js, Ruby, Python and many other types of projects.
With Go (>= 1.23):
1go install github.com/evilmartians/lefthook@latest
With NPM:
1npm install lefthook --save-dev
For Ruby:
1gem install lefthook
For Python:
1pip install lefthook
Installation guide with more ways to install lefthook: apt, brew, winget, and others.
Configure your hooks, install them once and forget about it: rely on the magic underneath.
1# Configure your hooks 2vim lefthook.yml 3 4# Install them to the git project 5lefthook install 6 7# Enjoy your work with git 8git add -A && git commit -m '...'
lefthook.yml
config options.Gives you more speed. docs
1pre-push: 2 parallel: true
If you want your own list. Custom and prebuilt examples.
1pre-commit: 2 commands: 3 frontend-linter: 4 run: yarn eslint {staged_files} 5 backend-linter: 6 run: bundle exec rubocop --force-exclusion {all_files} 7 frontend-style: 8 files: git diff --name-only HEAD @{push} 9 run: yarn stylelint {files}
If you want to filter list of files. You could find more glob pattern examples here.
1pre-commit: 2 commands: 3 backend-linter: 4 glob: "*.rb" # glob filter 5 exclude: '(^|/)(application|routes)\.rb$' # regexp filter 6 run: bundle exec rubocop --force-exclusion {all_files}
If you want to execute the commands in a relative path
1pre-commit: 2 commands: 3 backend-linter: 4 root: "api/" # Careful to have only trailing slash 5 glob: "*.rb" # glob filter 6 run: bundle exec rubocop {all_files}
If oneline commands are not enough, you can execute files. docs
1commit-msg: 2 scripts: 3 "template_checker": 4 runner: bash
If you want to control a group of commands. docs
1pre-push: 2 commands: 3 packages-audit: 4 tags: 5 - frontend 6 - linters 7 run: yarn lint 8 gems-audit: 9 tags: 10 - backend 11 - security 12 run: bundle audit
If you are in the Docker environment. docs
1pre-commit: 2 scripts: 3 "good_job.js": 4 runner: docker run -it --rm <container_id_or_name> {cmd}
If you a frontend/backend developer and want to skip unnecessary commands or override something into Docker. docs
1# lefthook-local.yml 2pre-push: 3 exclude_tags: 4 - frontend 5 commands: 6 packages-audit: 7 skip: true
If you want to run hooks group directly.
1$ lefthook run pre-commit
If you want to run specific group of commands directly.
1fixer: 2 commands: 3 ruby-fixer: 4 run: bundle exec rubocop --force-exclusion --safe-auto-correct {staged_files} 5 js-fixer: 6 run: yarn eslint --fix {staged_files}
1$ lefthook run fixer
You can control what lefthook prints with output option.
1output: 2 - execution 3 - failure
Check examples
No vulnerabilities found.
Reason
30 commit(s) and 26 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
packaging workflow detected
Details
Reason
SAST tool is run on all commits
Details
Reason
Found 2/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
Project has not signed or included provenance with any releases.
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More