There's a Python package for this available here. Per the usage documentation:
If you want to manually run all pre-commit hooks on a repository, run pre-commit run --all-files
. To run individual hooks use pre-commit run
.
So pre-commit run --all-files
is what the OP is after.