Prek is a Git hook manager written in Rust that runs configured hooks as a single binary without requiring Python or other external runtimes. It executes hooks faster than standard tools through parallel processing and bundled Rust implementations, and includes a built-in hook repository that enables fully offline operation without network access or environment setup. The tool supports both TOML and YAML configuration formats with identical semantics, and can run hooks from existing pre-commit configuration files without modification.
Prek distinguishes itself through workspace-aware monorepo support, discovering nested project configurations recursively and running hooks independently per project with parent-child ordering. It provides containerized hook execution inside Docker containers, managed language environments for Python, Node, Go, Rust, and other runtimes, and a configurable auto-update system that delays adoption of new hook revisions by a minimum age while validating pinned SHA revisions against upstream refs. The tool also offers parallel project discovery with caching, and can replace remote hook implementations with faster Rust-native versions automatically.
The tool manages the full hook lifecycle including installation of Git shims for automatic execution, selective hook execution by project or ID, dry-run previews, and CI integration. It supports file filtering by regex or glob patterns, hook execution ordering with numeric priority, and output control for debugging. Configuration validation, cache management, and migration from existing pre-commit setups are provided through dedicated commands.