Description
prek is a Git hook manager written in Rust. It runs hooks before you commit, on demand, or in CI, and those hooks can format files, catch lint errors, detect secrets or run any other command a project defines. It also installs and manages the tools and dependencies the hooks need. The project describes it as a reimagined version of the pre-commit tool, distributed as a single binary with no Python or other runtime required. It is fully compatible with existing pre-commit configurations and hooks, so it can be used as a drop-in replacement. The site says it is faster than pre-commit and uses less disk space. Monorepos are supported through a workspace mode, including concurrent runs for independent projects at the same depth. It integrates with uv for Python virtual environments and includes improved toolchain installs for Python, Node.js, Bun, Go, Rust and Ruby, shared between hooks. Some common hooks are implemented natively in Rust. The documentation covers installation, a quickstart, migration from other tools, configuration, local hooks, continuous integration, and an authoring guide for hook repositories. The site notes that projects such as CPython, Apache Airflow and FastAPI use it.…
Highlights
- Single binary with no runtime needed
- Drop-in compatible with pre-commit
- Monorepo workspace mode
- Toolchains for several languages
- Built-in Rust hooks
Ratings & Reviews
No ratings yet
Be the first to rate Prek.
People also visit
Prek FAQ
What is prek?
A Git hook manager written in Rust that runs hooks before commits, on demand or in CI.
Is it a replacement for pre-commit?
Yes. The site says it is fully compatible with pre-commit configurations and hooks, so it works as a drop-in replacement.
Do I need Python to use it?
No. It is a single binary with no dependencies and does not need Python or any other runtime.
Does it support monorepos?
Yes. It has built-in workspace support, including concurrent execution for independent projects at the same depth.
Can I use hooks from private repositories?
Yes. The FAQ describes credential helpers, SSH URLs and URL rewriting with tokens for CI.
Which projects use it?
The site names CPython, Apache Airflow and FastAPI as projects that use it.
What are the best Prek alternatives?
Popular alternatives to Prek include Go Git, GitGuard and Git Cliff. See all Prek alternatives







