Have a look at https://github.com/j178/prek is a RiiR of pre-commit so the module does not require api changes.