Scripts2026年4月7日·1 分钟阅读

Lefthook — Fast Git Hooks Manager in Go

Blazing-fast Git hooks manager written in Go. Run linters, formatters, and tests on git commit/push in parallel. Zero-dependency single binary. Replaces Husky + lint-staged. 5,000+ stars.

SC
Script Depot · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

npm install lefthook --save-dev
npx lefthook install
# lefthook.yml
pre-commit:
  parallel: true
  commands:
    lint:
      glob: "*.{ts,tsx}"
      run: npx biome check {staged_files}

简介

Lefthook 是 Go 编写的极速 Git Hooks 管理器,GitHub 5,000+ stars。并行运行 linter、格式化和测试,启动仅 5ms。替代 Husky + lint-staged。适合需要快速可靠 pre-commit 检查的团队。


🙏

来源与感谢

Created by Evil Martians. Licensed under MIT.

lefthook — stars 5,000+

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产