j178 /prek

⚡ A fast Git hook manager written in Rust, designed as a drop-in alternative to pre-commit, reimagined.

★ 8,800⑂ 253👁 14⑃ 2,286● 699▤ 103
RustMITCreated 2024-10-07prek.j178.dev/
Download: 0.5.100.5.10 ↓0.5.102026-11-04
+3
Daily
8,800
stars
253
forks
14
watchers
2,286
prs
699
issues
103
releases

README

Installation • Quick start • Documentation



 About



prek is a framework for running hooks on your code. It runs them before you commit changes, on demand, or in CI.
These hooks can format files, catch lint errors, detect secrets, or run any other command your project defines.
prek also installs and manages the tools and dependencies they need.

You may already be familiar with the pre-commit tool. prek is a reimagined version of it,
built in Rust. It is faster and distributed as a single binary with no runtime dependencies. It is fully compatible
with pre-commit configurations and hooks, so you can use it as a drop-in replacement without changing your setup.



Although prek is pretty new, it’s already powering real‑world projects like CPython, Apache Airflow, FastAPI, and more projects are picking it up—see Who is using prek?. If you’re looking for an alternative to pre-commit, please give it a try—we’d love your feedback!



 Features

- A single binary with no dependencies, does not require Python or any other runtime.
- Faster than pre-commit and more efficient in disk space usage.
- Fully compatible with the original pre-commit configurations and hooks.
- Built-in support for monorepos (i.e. workspace mode), including concurrent execution for independent same-depth projects.
- Integration with uv for managing Python virtual environments and dependencies.
- Improved toolchain installations for Python, Node.js, Bun, Go, Rust and Ruby, shared between hooks.
- Built-in Rust-native implementation of some common hooks.



 Installation


Standalone installer

prek provides a standalone installer script to download and install the tool,

On Linux and macOS:



bash
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.5.10/prek-installer.sh | sh




On Windows:



powershell
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.5.10/prek-installer.ps1 | iex"







PyPI



prek is published as Python binary wheel to PyPI, you can install it using pip, uv (recommended), or pipx:

bash
 Using uv (recommended)
uv tool install prek

 Using uvx (install and run in one command)
uvx prek

 Adding prek to the project dev-dependencies
uv add --dev prek

 Using pip
pip install prek

 Using pipx
pipx install prek







Homebrew



bash
brew install prek







mise



To use prek with mise (v2025.8.11 or later):

bash
mise use prek







Cargo binstall



Install pre-compiled binaries from GitHub using cargo-binstall:

bash
cargo binstall prek







Cargo



Build from source using Cargo (Rust 1.97+ is required):

bash
cargo install --locked prek







npmjs



prek is published as a Node.js package
and can be installed with any npm-compatible package manager:

bash
 As a dev dependency
npm add -D @j178/prek
pnpm add -D @j178/prek
bun add -D @j178/prek

 Or install globally
npm install -g @j178/prek
pnpm add -g @j178/prek
bun install -g @j178/prek

 Or run directly without instal

Top issues

Discussions

Latest release

0.5.10 v0.5.10 2026-11-04
Release Notes

Released on 2026-11-04.

 Enhancements

- Add a builtin replace-pattern hook (2981)

 Bug fixes

- Avoid downloading Node prereleases by default (2995)
- Keep file checks out of rayon's recursive frames (2999)
- Skip Node releases without a compatible archive (2996)

 Documentation

- Add equivalent prek.toml examples throughout the documentation (2979)

 Contributors

- @connorbrinton
- @j178

 Install prek 0.5.10

 Install prebuilt binaries via shell script

sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.5.10/prek-installer.sh | sh

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON