Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust

Rust-made Prek crashes the party—devs cheer, skeptics ask “why hooks”

TLDR: Prek is a new Rust-based, faster drop-in tool for running code checks before commits, already used by big projects. The community is split: fans love the speed and simplicity, while skeptics question git hooks’ value and prefer scripts or CI pipelines; the debate is whether speed matters if hooks are optional.

A new Rust-built tool called Prek just barged into the coding world promising a faster, simpler replacement for pre-commit—the little “gatekeepers” that run checks before you save code. It’s a single, no‑dependency binary with speed bragging rights, already used by big names like Apache Airflow and FastAPI. Cue the confetti… and the comment wars.

On Team Hype, users raved about the drop-in switch: rurban crowed that it’s “not just faster” but feature-richer, and BewareTheYiga called it “a breath of fresh air.” Fans loved that it works with existing configs and even plays nice with monorepos (big codebases split into folders), while offering a buffet of install options—brew, npm, conda, Nix—like a developer Costco.

But the real drama? Whether git hooks matter at all. candiddevmike went full skeptic: hooks are opt-in (you can ignore them), they don’t show up nicely in CI/CD (the robots that test your code), and “why not just run a script?” Others shrugged off the speed pitch entirely, with fishgoesblub saying they’ve never had performance issues. Tool loyalty also flared: esafak asked if Prek beats their current setup built around hk.jdx.dev.

Meanwhile, Prek flaunts GitHub Actions support via j178/prek-action and admits it’s still chasing full parity with pre-commit. Translation: the Rust bros are flexing, but the “do we even need hooks?” crowd isn’t impressed. The vibe is equal parts victory lap and friendly roast.

Key Points

  • Prek is a Rust-built, drop-in alternative to pre-commit, aiming for faster performance and zero external runtime dependencies.
  • It is compatible with existing pre-commit configurations and hooks, with added features like monorepo (workspace) support and Rust-native hooks.
  • Prek integrates with uv for Python environments and shares toolchain installations for Python, Node.js, Go, Rust, and Ruby.
  • It is widely distributable and installable via numerous ecosystems (standalone, PyPI, Homebrew, npm, Nix, Conda, Scoop, MacPorts, Cargo, cargo-binstall) and supports self-update via the standalone installer.
  • Prek supports CI via GitHub Actions (j178/prek-action), is adopted by projects like Apache Airflow and FastAPI, and notes some remaining parity gaps with pre-commit.

Hottest takes

“Not just faster than pre-commit… with more features” — rurban
“I struggle to see value with git hooks… why not just call a shell script?” — candiddevmike
“Am I alone in never having performance issues with pre-commit?” — fishgoesblub
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.