About Prek
prek is a framework for running hooks on your code before you commit, on demand, or in CI. Hooks can format files, catch lint errors, detect secrets or run any other command a project defines, and prek installs and manages the tools and dependencies those hooks need.
It is a reimagined version of the pre-commit tool, built in Rust and distributed as a single binary with no runtime dependencies. It is fully compatible with pre-commit configurations and hooks, so it can replace pre-commit without changing a setup. The project lists CPython, Apache Airflow and FastAPI among the projects already using it, and the code is MIT licensed.
Key features
- Single binary needing no Python or other runtime
- Workspace mode for monorepos
- Uses uv to manage Python environments
- Toolchains for Python, Node.js, Bun, Go, Rust and Ruby
- Rust-native versions of some common hooks
Good fit for
- Formatting and linting before a commit
- Detecting secrets in commits
- Running hook checks in CI
- Hook management in monorepos
Prek: questions and answers
- What is Prek used for?
- Prek is a Rust reimplementation of pre-commit that runs hooks before commits, on demand or in CI, as a single binary with no runtime dependencies. It is a good fit for formatting and linting before a commit, detecting secrets in commits, and running hook checks in CI.
- Is Prek open source?
- Yes. Prek is open source under the MIT licence. Its source code is on GitHub at j178/prek and is written mainly in Rust.
- Is Prek free?
- Yes. Prek is open source, so the software itself is free to use.
- Can I self-host Prek?
- Yes. Prek can be self-hosted on your own server or infrastructure.
- Is Prek actively maintained?
- Yes. The most recent commit to Prek was on 19 November 2026, and the latest release is v0.5.11, published on 16 November 2026. The project has 8.8k stars on GitHub, with 185 added in the last 30 days.
