Release Notes
This is a re-release of 0.2.0-alpha.1, fixed an issue that prereleases are not published to PyPI.
This is a huge milestone release that introduces Workspace Mode — first‑class monorepo support.
prek now allows you to manage multiple projects with their own .pre-commit-config.yaml within a single repository. It auto‑discovers nested projects, runs hooks in project scope, and provides flexible selectors to target specific projects and hooks. This makes prek a powerful tool for managing pre-commit hooks in complex repository structures.
Note: If you ran prek install in a repo before, you gonna need to run prek install again to replace the old git hook scripts for the workspace mode to work.
For more details, see Workspace Mode. If you encounter any issues, please report them at Issues.
Special thanks to @potiuk for all the help and feedback in designing and testing this feature!
Enhancements
- Support multiple
.pre-commit-config.yamlin a workspace (monorepo mode) (#583) - Implement project and hook selector (#623)
- Add
prek run --cd <dir>to change directory before running (#581) - Support
prek listin workspace mode (#586) - Support
prek install|install-hooks|hook-impl|init-template-dirin workspace mode (#595) - Implement
auto-updatein workspace mode (#605) - Implement selector completion in workspace mode (#639)
- Simplify
auto-updateimplementation (#608) - Add a
--dry-runflag toprek run(#622) - Cache workspace discovery result (#636)
- Fix local script hook entry path in workspace mode (#603)
- Fix
hook-implallow missing config (#600) - Fix docker mount in workspace mode (#638)
- Show project line when project is not root (#637)
Documentation
- Publish docs to
https://prek.j178.dev(#627) - Improve workspace docs about skips rule (#615)
- Add an full example and update docs (#582)
Other changes
Contributors
Install prek 0.2.0-alpha.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.0-alpha.2/prek-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/j178/prek/releases/download/v0.2.0-alpha.2/prek-installer.ps1 | iex"Install prebuilt binaries via Homebrew
brew install j178/tap/prek