github j178/prek v0.6.0
0.6.0

48 minutes ago

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-stage to prek run, it now exits with status 1 when none of those hooks matches the requested stage. To run every hook configured for a stage, omit the hook names. (#3105)
  • prek update and prek autoupdate now validate every --repo argument before updating any revisions. A single unknown repository makes the command exit with status 1. Use the repo value as written in your config. (#3106)
  • When SSL_CERT_FILE or SSL_CERT_DIR is 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 set PREK_SYSTEM_CERTS=true. PREK_NATIVE_TLS remains 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 | sh

Install 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 prek

Download 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/prek

You 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>

Don't miss a new prek release

NewReleases is sending notifications on new releases.