prek: a better `pre-commit`

14 points by kantord


krtab

I find it very frustrating that this is only tagged "vibecodding", and because it has already be "user corrected" (or in this case, maybe user sabotaged), it can't be changed again.

natfu

I've migrated a bunch of repositories from pre-commit to prek, it was easy and painless, just running the hooks is instant. For those that don't want to be hampered by commit hooks, you can just run all the hooks in CI anyways. You can see what the creators of uv, ruff, etc are doing on their own repo. With hook stages, you can also keep fast hooks for pre-commit and slower ones for manual or pre-push stages.

Tenzer

I've replaced pre-commit with prek everywhere and it's working a treat!

kantord

I'm not involved with this project but I tried it and had a really good experience. I was surprised to see that it was not posted here yet.

I really like pre-commit but unfortunately it never reached its true potential, mostly because it never reached the popularity it deserved.

I don't really think it needed a Rust rewrite for any technical reason... It's not like you couldn't make it just as performant in Python. But perhaps adding a native command is more palatable to non-Python teams. Or at least, more popular for whatever reason.

prek seems to be a painless drop-in replacement, and it already seems like it's gaining more widespread adoption even outside of the Python ecosystem. So I'm really excited to see where this greater popularity will take the concept.

fanf

previously (6 comments)