prek is a fast Git hook manager written in Rust, designed as a drop-in alternative to pre-commit.
prek solves the problem of running code quality checks and other hooks efficiently before commits, on demand, or in CI. It manages the installation and execution of tools that format files, catch lint errors, detect secrets, or run custom commands. The tool is built in Rust and distributed as a single binary with no runtime dependencies, eliminating the need for Python or other runtimes. It maintains full compatibility with pre-commit configurations and hooks, allowing users to switch without changing their existing setup.
Teams evaluating prek should know it suits projects of any size, particularly those seeking faster hook execution and reduced disk overhead compared to pre-commit. The tool includes built-in support for monorepos through workspace mode with concurrent execution for independent projects at the same depth. It offers improved toolchain management for Python, Node.js, Bun, Go, Rust, and Ruby with shared installations across hooks, and integrates with uv for Python virtual environment management. The tool also provides Rust-native implementations of common hooks as built-in alternatives.
The project shows active development with regular updates and refinements to core functionality. The maintainer responds to user feedback and incorporates it into the tool's evolution. The codebase demonstrates attention to performance optimization and cross-platform compatibility. Development includes ongoing work to expand built-in hook implementations and improve the monorepo feature set.