mirror of
https://github.com/j178/prek.git
synced 2026-05-05 18:25:21 +02:00
1.4 KiB
1.4 KiB
Difference from pre-commit
preksupports both.pre-commit-config.yamland.pre-commit-config.ymlconfiguration files.prekimplements some common hooks frompre-commit-hooksin Rust for better performance.prekuses~/.prekas the default cache directory for repos, environments and toolchains.prekdecoupled hook environment from their repositories, allowing shared toolchains and environments across hooks.preksupportslanguage-versionas a semver specifier and automatically installs the required toolchains.prekprovides dynamic completions of hook id.
prek run
prek run --last-committo run hooks on files changed by the last commit.prek run --directory <DIR>to run hooks on a specified directory.prek run [HOOK_ID] [HOOK_ID] ...to run multiple hooks.
prek list
prek list command lists all available hooks, their ids, and descriptions. This provides a better overview of the configured hooks.
prek sample-config
prek sample-configcommand has a--fileoption to write the sample configuration to a specific file.
Python support
preksupports Python toolchain management, it will install the required Python versions automatically.prekusesuvfor creating virtual environments and installing dependencies.preksupports Python hooks with PEP 723 inline metadata.
Future plans
- Built-in support for monorepos.
- Global configurations.