docs/compatibility.md
prek aims to be a practical drop-in replacement for pre-commit for existing repositories, hook configs, and day-to-day workflows.
.pre-commit-config.yaml and .pre-commit-config.yml files work in prek. See Configuration.pre-commit workflows keep working, including the usual hook repositories and manifests.prek keeps compatibility aliases for the commands below, but the preferred spellings use a more descriptive CLI layout.
| Compatibility spelling | Preferred prek spelling |
|---|---|
prek install-hooks | prek prepare-hooks |
prek install --install-hooks | prek install --prepare-hooks |
prek autoupdate | prek auto-update |
prek gc | prek cache gc |
prek clean | prek cache clean |
prek init-templatedir | prek util init-template-dir |
prek init-template-dir | prek util init-template-dir |
pre-commit migrate-config | Not provided directly; use prek util yaml-to-toml to migrate YAML to prek.toml |
pre-commit keeps many maintenance commands as separate top-level entries. prek reorganizes some of them so the command tree is easier to navigate:
prek cacheprek utilprepare-hooks describes what the command actually does more clearly than install-hooksThat improves discoverability without dropping compatibility, because the older spellings remain available.
pre-commit hazmat is not implemented in prek.If the same config must continue working in upstream pre-commit, stay with the YAML config format and avoid prek-only features such as:
prek.tomlrepo: builtinfiles and excludeSee Configuration for config format guidance, Configuration Reference for key-level details, and Differences for broader behavior and CLI differences.