Repository navigation
Release Notes
Released on 2026-12-01.
Breaking changes
Most users can upgrade to 0.6 without changing their configuration or scripts.
The two CLI changes below align prek's exit codes with pre-commit.
- If you pass hook names and
--hook-stagetoprek run, it now exits with status1when none of those hooks matches the requested stage. To run every hook configured for a stage, omit the hook names. (#3105) prek updateandprek autoupdatenow validate every--repoargument before updating any revisions. A single unknown repository makes the command exit with status1. Use therepovalue as written in your config. (#3106)- When
SSL_CERT_FILEorSSL_CERT_DIRis non-empty, prek's HTTP client (reqwest) trusts only the CA certificates loaded from those paths, even if it finds none. If you used these variables to add a private CA, include the public roots you need in the same trust bundle. To use the system trust store, unset both variables and setPREK_SYSTEM_CERTS=true.PREK_NATIVE_TLSremains a deprecated alias. (#2964)
Highlights
Faster repeat checks with prek update
prek update now reuses Git objects from earlier checks while still looking for
new upstream tags. In our GitHub benchmark, repeat runs of prek update --check
took 62–74% less time with a warm cache. Median time fell from 2.20 s to 0.84 s
for pre-commit/pre-commit-hooks and from 3.04 s to 0.80 s for crate-ci/typos. (#3080)
Configure hooks in pyproject.toml or Cargo.toml
Keep your hooks in the manifest you already use. Put the same settings you would
use in prek.toml under [tool.prek] in pyproject.toml, or under
[package.metadata.prek] or [workspace.metadata.prek] in Cargo.toml.
A standalone hook configuration in the same directory still takes precedence. (#3093)
Include formatter fixes in the same commit
Set stage_fixed = true on a formatter to let the installed Git pre-commit
hook include verified fixes to matching staged files in the same commit. This
saves a second round of git add and git commit. Manual prek run invocations
still leave fixes in the working tree for review. (#3085)
# pyproject.toml
[[tool.prek.repos]]
repo = "builtin"
hooks = [{ id = "end-of-file-fixer", stage_fixed = true }]Enhancements
- Allow pre-commit hooks to stage verified fixes (#3085)
- Load hook configuration from pyproject.toml and Cargo.toml (#3093)
- Restore prebuilt packages for RISC-V Linux (#3087)
- Skip the full history walk for new pre-push refs (#3035)
- Support
{config_dir}in hook entries and arguments (#3089)
Performance
- Extract toolchain archives with synchronous tar and ZIP readers (#3094)
- Keep small packs when fetching hook repositories (#3076)
- Read pre-push diff bases from git rev-list (#3090)
- Reuse Git objects across hook update checks (#3080)
- Reuse cached Git objects when fetching another hook revision (#3078)
- Reuse installed hook environments across try-repo runs (#3082)
- Reuse the installed hook manifest during update checks (#3083)
- Skip tag discovery when fetching hook repositories (#3075)
Contributors
Install prek 0.6.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.6.0/prek-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/j178/prek/releases/download/v0.6.0/prek-installer.ps1 | iex"Install prebuilt binaries via Homebrew
brew install prekDownload prek 0.6.0
| File | Platform | Checksum |
|---|---|---|
| prek-aarch64-apple-darwin.tar.gz | Apple Silicon macOS | checksum |
| prek-x86_64-apple-darwin.tar.gz | Intel macOS | checksum |
| prek-aarch64-pc-windows-msvc.zip | ARM64 Windows | checksum |
| prek-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| prek-aarch64-unknown-linux-gnu.tar.gz | ARM64 Linux | checksum |
| prek-powerpc64le-unknown-linux-gnu.tar.gz | PPC64LE Linux | checksum |
| prek-riscv64gc-unknown-linux-gnu.tar.gz | RISCV Linux | checksum |
| prek-x86_64-unknown-linux-gnu.tar.gz | x64 Linux | checksum |
| prek-aarch64-unknown-linux-musl.tar.gz | ARM64 MUSL Linux | checksum |
| prek-x86_64-unknown-linux-musl.tar.gz | x64 MUSL Linux | checksum |
Verifying GitHub Artifact Attestations
The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:
gh attestation verify <file-path of downloaded artifact> --repo j178/prekYou can also download the attestation from GitHub and verify against that directly:
gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>