# prek: pre-commit, but fast


[pre-commit](https://pre-commit.com/) is an essential tool in my development workflow for running [ruff](https://pydevtools.com/handbook/reference/ruff.md) and other tools. However, nobody wants to wait for their commits to be saved, and pre-commit isn't always the fastest.

[prek](https://pydevtools.com/handbook/reference/prek.md) is a Rust-based drop-in replacement that runs 10x faster while using half the disk space.

Replacing pre-commit with prek is painless:

1. Install with `uv tool install prek`
2. Run `pre-commit uninstall && prek install`

That's it. No configuration changes, no compatibility issues.

Major projects like Apache Airflow, PDM, and OpenLineage have already adopted prek. It handles the same hook ecosystem as pre-commit but without the performance penalties. The 10x speed improvement alone justifies switching. [Everything else](https://github.com/j178/prek?tab=readme-ov-file#prek-provides-a-better-user-experience) is bonus.

For a step-by-step setup, see [How to set up prek hooks for a Python project](https://pydevtools.com/handbook/how-to/how-to-set-up-prek-hooks-for-a-python-project.md), or the [pre-commit version of the same guide](https://pydevtools.com/handbook/how-to/how-to-set-up-pre-commit-hooks-for-a-python-project.md) if you're not ready to switch.
