使用 prek 快速进行多语言 Git 钩子质量检查
Use prek as a fast pre-commit-compatible hook runner so agents can lint, format, and policy-check repository changes before handing work back.
Prerequisites
prek; Git; repository pre-commit configuration
Installation
Use the upstream install or setup path that matches your environment:
- uv tool install prek
- uv add --dev prek
- pip install prek
- pipx install prek
Requirements and caveats from upstream:
-
-
- Although prek is pretty new, it’s already powering real‑world projects like CPython, Apache Airflow, [FastAPI](https://github.com/1991513ccie-png/skills
Basic usage or getting-started notes:
- pre-commit is a framework to run hooks written in many languages, and it manages the
- Faster than pre-commit and more efficient in disk space usage.
- Quick start
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/j178/prek/HEAD/README.md
Documentation
- https://github.com/1991513ccie-png/skills