v0.4.0
j178/prekv0.4.0May 14, 2026by github-actions[bot]
AI Summary
prek v0.4.0 is a minor release with enhancements to path handling, auto-update behavior, and npm cache management for node hooks. It includes two narrow breaking changes affecting hook script generation and language version configuration that most users should not be impacted by.
Key Highlights
- Expand tilde (~) in `--config`, `--cd`, `--log-file` and `--git-dir` flags for better path handling
- Prevent auto-update cooldown from downgrading versions
- Use managed npm cache for node hooks to improve performance and reliability
- Fix npm config environment variable overrides for node hooks
- Add documentation for enabling Git 2.54 config-based global hooks
Breaking Changes
- Generated hook scripts no longer preserve `-q`, `-v`, or `--no-progress` flags passed to `prek install`
- `language_version` no longer accepts direct executable paths - use `language_version: system` instead
New Features
- Tilde expansion in CLI flags (--config, --cd, --log-file, --git-dir)
- Auto-update cooldown now prevents version downgrades
- Managed npm cache support for node hooks
- Fixed npm config env overrides for node hooks
- New cookbook documentation for Git 2.54 config-based global hooks
Full Release Notes
## Release Notes Released on 2026-05-14. ### Breaking changes These are narrow cleanup breaks in behavior that was either temporary or never worked correctly. Most users should not need to change anything. - Generated hook scripts no longer preserve `-q`, `-v`, or `--no-progress` passed to `prek install`. This only affects users who expected those global flags to be baked into installed hooks. ([#1966](https://github.com/j178/prek/pull/1966)) - `language_version` no longer accepts direct executable paths. Use `language_version: system` for a system toolchain, or use a supported version request instead. This path form did not work reliably before, so existing working configs should be unaffected. ([#1831](https://github.com/j178/prek/pull/1831)) ### Enhancements - Expand tilde in `--config`, `--cd`, `--log-file` and `--git-dir` ([#2063](https://github.com/j178/prek/pull/2063)) - Prevent auto-update cooldown downgrades ([#2055](https://github.com/j178/prek/pull/2055)) - Use managed npm cache for node hooks ([#2075](https://github.com/j178/prek/pull/2075)) ### Bug fixes - Fix npm config env overrides for node hooks ([#2074](https://github.com/j178/prek/pull/2074)) ### Documentation - Add cookbook page for enabling Git 2.54 config-based global hooks ([#2061](https://github.com/j178/prek/pull/2061)) ### Contributors - @j178 ## Install prek 0.4.0 ### Install prebuilt binaries via shell script ```sh curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.4.0/prek-installer.sh | sh ``` ### Install prebuilt binaries via powershell script ```sh powershell -ExecutionPolicy Bypass -c "irm https://github.com/j178/prek/releases/download/v0.4.0/prek-installer.ps1 | iex" ``` ### Install prebuilt binaries via Homebrew ```sh brew install prek ``` ## Download prek 0.4.0 | File | Platform | Checksum | |--------|----------|----------| | [prek-aarch64-apple-darwin.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-aarch64-apple-darwin.tar.gz) | Apple Silicon macOS | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-aarch64-apple-darwin.tar.gz.sha256) | | [prek-x86_64-apple-darwin.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-x86_64-apple-darwin.tar.gz) | Intel macOS | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-x86_64-apple-darwin.tar.gz.sha256) | | [prek-aarch64-pc-windows-msvc.zip](https://github.com/j178/prek/releases/download/v0.4.0/prek-aarch64-pc-windows-msvc.zip) | ARM64 Windows | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-aarch64-pc-windows-msvc.zip.sha256) | | [prek-i686-pc-windows-msvc.zip](https://github.com/j178/prek/releases/download/v0.4.0/prek-i686-pc-windows-msvc.zip) | x86 Windows | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-i686-pc-windows-msvc.zip.sha256) | | [prek-x86_64-pc-windows-msvc.zip](https://github.com/j178/prek/releases/download/v0.4.0/prek-x86_64-pc-windows-msvc.zip) | x64 Windows | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-x86_64-pc-windows-msvc.zip.sha256) | | [prek-aarch64-unknown-linux-gnu.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-aarch64-unknown-linux-gnu.tar.gz) | ARM64 Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-aarch64-unknown-linux-gnu.tar.gz.sha256) | | [prek-i686-unknown-linux-gnu.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-i686-unknown-linux-gnu.tar.gz) | x86 Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-i686-unknown-linux-gnu.tar.gz.sha256) | | [prek-riscv64gc-unknown-linux-gnu.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-riscv64gc-unknown-linux-gnu.tar.gz) | RISCV Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-riscv64gc-unknown-linux-gnu.tar.gz.sha256) | | [prek-s390x-unknown-linux-gnu.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-s390x-unknown-linux-gnu.tar.gz) | S390x Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-s390x-unknown-linux-gnu.tar.gz.sha256) | | [prek-x86_64-unknown-linux-gnu.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-x86_64-unknown-linux-gnu.tar.gz) | x64 Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-x86_64-unknown-linux-gnu.tar.gz.sha256) | | [prek-armv7-unknown-linux-gnueabihf.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-armv7-unknown-linux-gnueabihf.tar.gz) | ARMv7 Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-armv7-unknown-linux-gnueabihf.tar.gz.sha256) | | [prek-aarch64-unknown-linux-musl.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-aarch64-unknown-linux-musl.tar.gz) | ARM64 MUSL Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-aarch64-unknown-linux-musl.tar.gz.sha256) | | [prek-i686-unknown-linux-musl.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-i686-unknown-linux-musl.tar.gz) | x86 MUSL Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-i686-unknown-linux-musl.tar.gz.sha256) | | [prek-x86_64-unknown-linux-musl.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-x86_64-unknown-linux-musl.tar.gz) | x64 MUSL Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-x86_64-unknown-linux-musl.tar.gz.sha256) | | [prek-arm-unknown-linux-musleabihf.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-arm-unknown-linux-musleabihf.tar.gz) | ARMv6 MUSL Linux (Hardfloat) | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-arm-unknown-linux-musleabihf.tar.gz.sha256) | | [prek-armv7-unknown-linux-musleabihf.tar.gz](https://github.com/j178/prek/releases/download/v0.4.0/prek-armv7-unknown-linux-musleabihf.tar.gz) | ARMv7 MUSL Linux | [checksum](https://github.com/j178/prek/releases/download/v0.4.0/prek-armv7-unknown-linux-musleabihf.tar.gz.sha256) | ## 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](https://cli.github.com/manual/gh_attestation_verify): ```sh gh attestation verify <file-path of downloaded artifact> --repo j178/prek ``` You can also download the attestation from [GitHub](https://github.com/j178/prek/attestations) and verify against that directly: ```sh gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation> ```