Release Notes
Released on 2026-02-06.
Highlights
-
prek.tomlis here!You can now use
prek.tomlas an alternative to.pre-commit-config.yamlfor configuring prek.prek.tomlmirrors the structure of.pre-commit-config.yaml, but TOML is less error-prone. Your existing.pre-commit-config.yamlwill continue to work, but for new users and new projects,prek.tomlmay make more sense. If you want to switch, runprek util yaml-to-tomlto convert YAML configs toprek.toml. See configuration docs for details.For example, this config:
repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: check-yaml
Can be written as
prek.tomllike this:[[repos]] repo = "https://github.com/pre-commit/pre-commit-hooks" rev = "v6.0.0" hooks = [ { id = "check-yaml" } ]
-
serde-yamlhas been replaced withserde-saphyrWe replaced the long-deprecated
serde-yamlcrate withserde-saphyrfor YAML parsing. It is written in safe Rust and has better error messages, performance, and security. This lets us provide precise location information for configuration parsing errors, which should make it easier to fix config issues.For example, this invalid config:
repos: - repo: https://github.com/crate-ci/typos hooks: - id: typos
Before:
$ prek run error: Failed to parse `.pre-commit-config.yaml` caused by: Invalid remote repo: missing field `rev`
Now:
$ prek run error: Failed to parse `.pre-commit-config.yaml` caused by: error: line 2 column 5: missing field `rev` at line 2, column 5 --> <input>:2:5 | 1 | repos: 2 | - repo: https://github.com/crate-ci/typos | ^ missing field `rev` at line 2, column 5 3 | hooks: 4 | - id: typos |
-
prek utilsubcommandsWe added a new
prek utiltop-level command for miscellaneous utilities that don't fit into other categories. The first two utilities are:prek util identify: shows the identification tags of files that prek uses for file filtering, which can be useful for debugging and writingtypes/types_or/exclude_typesfilters.prek util yaml-to-toml: converts.pre-commit-config.yamltoprek.toml.
We also moved
prek init-template-dirunderprek utilfor better organization. The oldprek init-template-dircommand is still available (hidden) as an alias for backward compatibility.
Enhancements
- Add
prek util identifysubcommand (#1554) - Add
prek util yaml-to-tomlto convert.pre-commit-config.yamltoprek.toml(#1584) - Detect install source for actionable upgrade hints (#1540)
- Detect prek installed by the standalone installer (#1545)
- Implement
serialize_yaml_scalarusingserde-saphyr(#1534) - Improve max cli arguments length calculation (#1518)
- Move
identifyandinit-template-dirunder theprek utiltop-level command (#1574) - Replace serde-yaml with serde-saphyr (again) (#1520)
- Show precise location for config parsing error (#1530)
- Support
Julialanguage (#1519) - Support
prek.toml(#1271) - Added
PREK_QUIETenvironment variable support (#1513) - Remove upper bound constraint of uv version (#1588)
Bug fixes
- Do not make the child a session leader (#1586)
- Fix FilePattern schema to accept plain strings (#1564)
- Use semver fallback sort when tag timestamps are equal (#1579)
Documentation
- Add
OpenClawto the list of users (#1517) - Add
cachix/devenv,apache/lucene,copper-project/copper-rsas projects using prek (#1531, #1514, #1569) - Add document about authoring remote hooks (#1571)
- Add
llms.txtgeneration for LLM-friendly documentation (#1553) - Document using
--refreshto pick up.prekignorechanges (#1575) - Fix PowerShell completion instruction syntax (#1568)
- Update quick start to use
prek.toml(#1576)
Other changes
- Include
prek.tomlin run hint for config filename (#1578)
Contributors
Install prek 0.3.2
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.3.2/prek-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/j178/prek/releases/download/v0.3.2/prek-installer.ps1 | iex"Install prebuilt binaries via Homebrew
brew install j178/tap/prekInstall prebuilt binaries into your npm project
npm install @j178/prek@0.3.2Download prek 0.3.2
| 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-i686-pc-windows-msvc.zip | x86 Windows | checksum |
| prek-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| prek-aarch64-unknown-linux-gnu.tar.gz | ARM64 Linux | checksum |
| prek-i686-unknown-linux-gnu.tar.gz | x86 Linux | checksum |
| prek-riscv64gc-unknown-linux-gnu.tar.gz | RISCV Linux | checksum |
| prek-s390x-unknown-linux-gnu.tar.gz | S390x Linux | checksum |
| prek-x86_64-unknown-linux-gnu.tar.gz | x64 Linux | checksum |
| prek-armv7-unknown-linux-gnueabihf.tar.gz | ARMv7 Linux | checksum |
| prek-aarch64-unknown-linux-musl.tar.gz | ARM64 MUSL Linux | checksum |
| prek-i686-unknown-linux-musl.tar.gz | x86 MUSL Linux | checksum |
| prek-x86_64-unknown-linux-musl.tar.gz | x64 MUSL Linux | checksum |
| prek-arm-unknown-linux-musleabihf.tar.gz | ARMv6 MUSL Linux (Hardfloat) | checksum |
| prek-armv7-unknown-linux-musleabihf.tar.gz | ARMv7 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>