{"id":13393116,"url":"https://github.com/evilmartians/lefthook","last_synced_at":"2026-03-12T09:31:10.230Z","repository":{"id":37088351,"uuid":"169250119","full_name":"evilmartians/lefthook","owner":"evilmartians","description":"Fast and powerful Git hooks manager for any type of projects.","archived":false,"fork":false,"pushed_at":"2026-02-02T08:40:53.000Z","size":87968,"stargazers_count":7455,"open_issues_count":52,"forks_count":262,"subscribers_count":25,"default_branch":"master","last_synced_at":"2026-02-02T19:35:44.297Z","etag":null,"topics":["git","go","golang","hacktoberfest","hooks","lefthook","manager"],"latest_commit_sha":null,"homepage":"http://lefthook.dev/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evilmartians.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-02-05T14:00:56.000Z","updated_at":"2026-02-02T18:42:32.000Z","dependencies_parsed_at":"2023-11-13T10:25:36.706Z","dependency_job_id":"a2b14727-1e2c-4282-830f-bb7ed4b9902b","html_url":"https://github.com/evilmartians/lefthook","commit_stats":{"total_commits":767,"total_committers":94,"mean_commits":8.159574468085106,"dds":0.5045632333767927,"last_synced_commit":"9996e0d9db43a6b856074d2b836adf924a24b992"},"previous_names":["arkweid/hookah","arkweid/lefthook"],"tags_count":208,"template":false,"template_full_name":null,"purl":"pkg:github/evilmartians/lefthook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilmartians%2Flefthook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilmartians%2Flefthook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilmartians%2Flefthook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilmartians%2Flefthook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evilmartians","download_url":"https://codeload.github.com/evilmartians/lefthook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evilmartians%2Flefthook/sbom","scorecard":{"id":16095,"data":{"date":"2025-08-11","repo":{"name":"github.com/evilmartians/lefthook","commit":"54fc0136d5bc7cda855702fc55eeabf5e1b64d7e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.6,"checks":[{"name":"Code-Review","score":2,"reason":"Found 7/29 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 18 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql.yml:18","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql.yml:19","Warn: no topLevel permission defined: .github/workflows/codeql.yml:1","Warn: no topLevel permission defined: .github/workflows/gh-pages.yml:1","Warn: no topLevel permission defined: .github/workflows/lint.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release.yml:9","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/codeql.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/gh-pages.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/gh-pages.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/gh-pages.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/gh-pages.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/gh-pages.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/gh-pages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/lint.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:111: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:116: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:122: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:151: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:161: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:235: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:83: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:171: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:175: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:181: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:203: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:83: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:94: update your workflow using https://app.stepsecurity.io/secureworkflow/evilmartians/lefthook/test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:185","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:126","Info:   0 out of  29 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  12 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:12"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.12.3 not signed: https://api.github.com/repos/evilmartians/lefthook/releases/239307456","Warn: release artifact v1.12.2 not signed: https://api.github.com/repos/evilmartians/lefthook/releases/231743991","Warn: release artifact v1.12.1 not signed: https://api.github.com/repos/evilmartians/lefthook/releases/231073158","Warn: release artifact v1.12.0 not signed: https://api.github.com/repos/evilmartians/lefthook/releases/230822945","Warn: release artifact v1.11.16 not signed: https://api.github.com/repos/evilmartians/lefthook/releases/229743243","Warn: release artifact v1.12.3 does not have provenance: https://api.github.com/repos/evilmartians/lefthook/releases/239307456","Warn: release artifact v1.12.2 does not have provenance: https://api.github.com/repos/evilmartians/lefthook/releases/231743991","Warn: release artifact v1.12.1 does not have provenance: https://api.github.com/repos/evilmartians/lefthook/releases/231073158","Warn: release artifact v1.12.0 does not have provenance: https://api.github.com/repos/evilmartians/lefthook/releases/230822945","Warn: release artifact v1.11.16 does not have provenance: https://api.github.com/repos/evilmartians/lefthook/releases/229743243"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (19) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T15:49:41.650Z","repository_id":37088351,"created_at":"2025-08-14T15:49:41.650Z","updated_at":"2025-08-14T15:49:41.650Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29360820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","go","golang","hacktoberfest","hooks","lefthook","manager"],"created_at":"2024-07-30T17:00:43.554Z","updated_at":"2026-03-12T09:31:10.222Z","avatar_url":"https://github.com/evilmartians.png","language":"Go","readme":"![Build Status](https://github.com/evilmartians/lefthook/actions/workflows/test.yml/badge.svg?branch=master)\n[![codecov](https://codecov.io/gh/evilmartians/lefthook/graph/badge.svg?token=d93ya8MfmB)](https://codecov.io/gh/evilmartians/lefthook)\n\n# Lefthook\n\n\u003cimg align=\"right\" width=\"147\" height=\"100\" title=\"Lefthook logo\"\n     src=\"./logo_sign.svg\"\u003e\n\nA Git hooks manager for Node.js, Ruby, Python and many other types of projects.\n\n* **Fast.** It is written in Go. Can run commands in parallel.\n* **Powerful.** It allows to control execution and files you pass to your commands.\n* **Simple.** It is single dependency-free binary which can work in any environment.\n\n📖 [Introduction post](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook)\n\n\u003ca href=\"https://evilmartians.com/?utm_source=lefthook\"\u003e\n\u003cimg src=\"https://evilmartians.com/badges/sponsored-by-evil-martians.svg\" alt=\"Sponsored by Evil Martians\" width=\"100%\" height=\"54\"\u003e\u003c/a\u003e\n\n## Install\n\nWith **Go** (\u003e= 1.25):\n\n```bash\ngo install github.com/evilmartians/lefthook/v2@v2.1.1\n```\n\n* or as a go tool\n\n```bash\ngo get -tool github.com/evilmartians/lefthook/v2@v2.1.0\n```\n\nWith **NPM**:\n\n```bash\nnpm install lefthook --save-dev\n```\n\nFor **Ruby**:\n\n```bash\ngem install lefthook\n```\n\nFor **Python**:\n\n```bash\npipx install lefthook\n```\n\n**[Installation guide][installation]** with more ways to install lefthook: [apt][install-apt], [brew][install-brew], [winget][install-winget], and others.\n\n## Usage\n\nConfigure your hooks, install them once and forget about it: rely on the magic underneath.\n\n#### TL;DR\n\n```bash\n# Configure your hooks\nvim lefthook.yml\n\n# Install them to the git project\nlefthook install\n\n# Enjoy your work with git\ngit add -A \u0026\u0026 git commit -m '...'\n```\n\n#### More details\n\n- [**Configuration**][configuration] for `lefthook.yml` config options.\n- [**Usage**][usage] for **lefthook** CLI options, and features.\n- [**Discussions**][discussion] for questions, ideas, suggestions.\n\u003c!-- - [**Wiki**](https://github.com/evilmartians/lefthook/wiki) for guides, examples, and benchmarks. --\u003e\n\n## Why Lefthook\n\n* ### **Parallel execution**\nGives you more speed. [docs][config-parallel]\n\n```yml\npre-push:\n  parallel: true\n```\n\n* ### **Flexible list of files**\nIf you want your own list. [Custom][config-files] and [prebuilt][config-run] examples.\n\n```yml\npre-commit:\n  jobs:\n    - name: lint frontend\n      run: yarn eslint {staged_files}\n\n    - name: lint backend\n      run: bundle exec rubocop --force-exclusion {all_files}\n\n    - name: stylelint frontend\n      files: git diff --name-only HEAD @{push}\n      run: yarn stylelint {files}\n```\n\n* ### **Glob and regexp filters**\nIf you want to filter list of files. You could find more glob pattern examples [here](https://github.com/gobwas/glob#example).\n\n```yml\npre-commit:\n  jobs:\n    - name: lint backend\n      glob: \"*.rb\" # glob filter\n      exclude:\n        - \"*/application.rb\"\n        - \"*/routes.rb\"\n      run: bundle exec rubocop --force-exclusion {all_files}\n```\n\n* ### **Execute in sub-directory**\nIf you want to execute the commands in a relative path\n\n```yml\npre-commit:\n  jobs:\n    - name: lint backend\n      root: \"api/\" # Careful to have only trailing slash\n      glob: \"*.rb\" # glob filter\n      run: bundle exec rubocop {all_files}\n```\n\n* ### **Run scripts**\n\nIf oneline commands are not enough, you can execute files. [docs][config-scripts]\n\n```yml\ncommit-msg:\n  jobs:\n    - script: \"template_checker\"\n      runner: bash\n```\n\n* ### **Tags**\nIf you want to control a group of commands. [docs][config-tags]\n\n```yml\npre-push:\n  jobs:\n    - name: audit packages\n      tags:\n        - frontend\n        - linters\n      run: yarn lint\n\n    - name: audit gems\n      tags:\n        - backend\n        - security\n      run: bundle audit\n```\n\n* ### **Support Docker**\n\nIf you are in the Docker environment. [docs][config-run]\n\n```yml\npre-commit:\n  jobs:\n    - script: \"good_job.js\"\n      runner: docker run -it --rm \u003ccontainer_id_or_name\u003e {cmd}\n```\n\n* ### **Local config**\n\nIf you are a frontend/backend developer and want to skip unnecessary commands or override something in Docker. [docs][usage-local-config]\n\n```yml\n# lefthook-local.yml\npre-push:\n  exclude_tags:\n    - frontend\n  jobs:\n    - name: audit packages\n      skip: true\n```\n\n* ### **Direct control**\n\nIf you want to run hooks group directly.\n\n```bash\n$ lefthook run pre-commit\n```\n\n* ### **Your own tasks**\n\nIf you want to run specific group of commands directly.\n\n```yml\nfixer:\n  jobs:\n    - run: bundle exec rubocop --force-exclusion --safe-auto-correct {staged_files}\n    - run: yarn eslint --fix {staged_files}\n```\n```bash\n$ lefthook run fixer\n```\n\n* ### **Control output**\n\nYou can control what lefthook prints with [output][config-output] option.\n\n```yml\noutput:\n  - execution\n  - failure\n```\n\n----\n\n### Guides\n\n* [Install with Node.js][install-node]\n* [Install with Ruby][install-ruby]\n* [Install with Homebrew][install-brew]\n* [Install with Winget][install-winget]\n* [Install for Debian-based Linux][install-apt]\n* [Install for RPM-based Linux][install-rpm]\n* [Install for Arch Linux][install-arch]\n* [Install for Alpine Linux][install-alpine]\n* [Usage][usage]\n* [Configuration][configuration]\n\u003c!-- * [Troubleshooting](https://github.com/evilmartians/lefthook/wiki/Troubleshooting) --\u003e\n\n\u003c!-- ### Migrate from --\u003e\n\u003c!-- * [Husky](https://github.com/evilmartians/lefthook/wiki/Migration-from-husky) --\u003e\n\u003c!-- * [Husky and lint-staged](https://github.com/evilmartians/lefthook/wiki/Migration-from-husky-with-lint-staged) --\u003e\n\u003c!-- * [Overcommit](https://github.com/evilmartians/lefthook/wiki/Migration-from-overcommit) --\u003e\n\n### Examples\n\nCheck [examples][examples]\n\n\u003c!-- ### Benchmarks --\u003e\n\u003c!-- * [vs Overcommit](https://github.com/evilmartians/lefthook/wiki/Benchmark-lefthook-vs-overcommit) --\u003e\n\u003c!-- * [vs pre-commit](https://github.com/evilmartians/lefthook/wiki/Benchmark-lefthook-vs-pre-commit) --\u003e\n\n\u003c!-- ### Comparison list --\u003e\n\u003c!-- * [vs Overcommit, Husky, pre-commit](https://github.com/evilmartians/lefthook/wiki/Comparison-with-other-solutions) --\u003e\n\n### Articles\n* [5 cool (and surprising) ways to configure Lefthook for automation joy](https://evilmartians.com/chronicles/5-cool-and-surprising-ways-to-configure-lefthook-for-automation-joy?utm_source=lefthook)\n* [Lefthook: Knock your team’s code back into shape](https://evilmartians.com/chronicles/lefthook-knock-your-teams-code-back-into-shape?utm_source=lefthook)\n* [Lefthook + Crystalball](https://evilmartians.com/chronicles/lefthook-crystalball-and-git-magic?utm_source=lefthook)\n* [Keeping OSS documentation in check with docsify, Lefthook, and friends](https://evilmartians.com/chronicles/keeping-oss-documentation-in-check-with-docsify-lefthook-and-friends?utm_source=lefthook)\n* [Automatically linting docker containers](https://dev.to/nitzano/linting-docker-containers-2lo6?utm_source=lefthook)\n* [Smooth PostgreSQL upgrades in DockerDev environments with Lefthook](https://dev.to/palkan_tula/smooth-postgresql-upgrades-in-dockerdev-environments-with-lefthook-203k?utm_source=lefthook)\n* [Lefthook for React/React Native apps](https://blog.logrocket.com/deep-dive-into-lefthook-react-native?utm_source=lefthook)\n\n\n[documentation]: https://lefthook.dev/\n[configuration]: https://lefthook.dev/configuration/index.html\n[examples]: https://lefthook.dev/examples/lefthook-local.html\n[installation]: https://lefthook.dev/installation/\n[usage]: https://lefthook.dev/usage/commands.html\n[discussion]: https://github.com/evilmartians/lefthook/discussions\n[install-apt]: https://lefthook.dev/installation/deb.html\n[install-ruby]: https://lefthook.dev/installation/ruby.html\n[install-node]: https://lefthook.dev/installation/node.html\n[install-brew]: https://lefthook.dev/installation/homebrew.html\n[install-winget]: https://lefthook.dev/installation/winget.html\n[install-rpm]: https://lefthook.dev/installation/rpm.html\n[install-arch]: https://lefthook.dev/installation/arch.html\n[install-alpine]: https://lefthook.dev/installation/alpine.html\n[config-parallel]: https://lefthook.dev/configuration/parallel.html\n[config-files]: https://lefthook.dev/configuration/files.html\n[config-glob]: https://lefthook.dev/configuration/glob.html\n[config-run]: https://lefthook.dev/configuration/run.html\n[config-scripts]: https://lefthook.dev/configuration/Scripts.html\n[config-tags]: https://lefthook.dev/configuration/tags.html\n[config-output]: https://lefthook.dev/configuration/output.html\n[usage-local-config]: https://lefthook.dev/examples/lefthook-local.html\n","funding_links":[],"categories":["Go","Tools and Utilities","Developer Tools","Git Tools","Hook management","Repositories","hacktoberfest","Development"],"sub_categories":["Development Tools","Hook management tools","Comparing workflows","Pre-commit Hooks"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilmartians%2Flefthook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevilmartians%2Flefthook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevilmartians%2Flefthook/lists"}