probably not relevant to you, since it is yet another tool for managing your development environment, but maybe have a look at devenv (https://devenv.sh). it's main purpose is managing the development environment, but it has integration for pre-commit (or even prek iirc) that let's pre-commit do it's thing, but takes over the dependency management.