Prek

j178·j178.Prek

⚡ Better `pre-commit`, re-engineered in Rust

winget install --id j178.Prek --exact --source winget

Latest 0.6.0·December 1, 2026

Release Notes

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
  • @j178
  • @eshattow
  • @patrick-immometrica 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 --repo j178/prek You can also download the attestation from GitHub and verify against that directly: gh attestation verify --bundle

Installer type: zip

x64—185E983E212A567A0DBA11A1DBCA10A8B8D7AC007C7BD344A2D2448FB3240BA4
arm64—5202F5FDFFC28E05D7B94DD133D30DEC7122157AC316638AF4A16EE31BF02093

Details

Homepage
https://github.com/j178/prek
License
MIT
Publisher
j178
Support
https://github.com/j178/prek/issues
Moniker
prek

Tags

gitgit-hookspre-commitprek

Older versions (29)

0.5.11
x64—6B396F6E369832B2458AC95E2E169536D64BE4941B48FE116AF21DF7E1E9AEA6
arm64—7917F97DBC2E5873B0E944E515EAD2CE4D2C541030D8FD00054E768E3F96812E
0.5.10
x64—4A506E19A95A1BBF40F304B245446C32078C7BE4D5B7E4CB412EA93A0CF8B4E5
arm64—FDDE05D5D7DDCCA3EB154265A9E4CCF2CB256006AA05D0B5B9D80887DD3D63F3
0.5.9
x64—B772063B6D9195C0647C0E73CFA258208D03B2B51ABFF115B76D24AEFA189D0B
arm64—1E298AE7AF82F0AE1DC880E8895FB510E4C78933F7BB8DABC543990EFF811EBA
0.5.7
x64—50CCC606E19965585807C0A8BE99DA82EB4237C7C9DF2539E5A83704D1F16A36
arm64—44B64E239617E5F09E99F03D1597DC7168ED36908BE33D4E9A068070615DC0F2
0.5.4
x64—244BC3EEADE60A0EE586DFE9F5C90BD1C1D790514009AAD2C7055DCB731A3E50
arm64—BB82DD1039F602E6B1E57B8B113B5C0000EEA35AE2931BF0C1AE7E61CE3DF697
0.5.2
x64—03B6A7261D3A7E2D184CECA9C7E5FCB43B9DEC83C8945976CDDC3CAA8B34B4C0
arm64—0C5C762B44630BFB08461B90ACCB46AB7B8EFECFAF0AD0C804A1EAE37948B0F4
0.5.1
x64—0560F9BB198602241491ABDCAC0D0AECDB18FE64EEAFF240B92EFA224479FBCC
arm64—C9A443249459631213981223EC09B4556515FF76D85A2B3E7AB7C62F14B5FD9B
0.5.0
x86—FE921C262D7F955ED033F04075DBEDABA5440B48A29DD91706416DAD998F87AB
x64—3B1704F9C44D2A5F29AF84C18DC5529C2CEFAB75697BDFDF69074CCED1C0533B
arm64—5B6CF315445F950FD535D181DCD5A446C305B5CA9E444E9AACDE6DF63A880A40
0.4.14
x86—7370CC9C1F715C0EA73199B1A77CF9BC3D3E1B9C180A85695519C34869B5D105
x64—284EB3B185788FBB5C1B53B1E2217C744BE44DEBAFF88EFD305B1947DF6F0B82
arm64—700C2AA43C88937BBA5BFC8199A0AB8D08BE30ED212B4A13BC91FEE3E4CF4050
0.4.12
x86—1A593E921805BE6C88842C1A0EA40699429B179601F363345309B3FBD0A85194
x64—1EA049702009636296CA845E91B336AEB203D47DF8CE500EB388672C8199D57B
arm64—AF21577BD67467E623B38EB0614B61E0E00D979062394F68F442F089D3A225CE
0.4.11
x86—6155CDFBAC560677C03E86BE6B06CF29905E85C2F89D16156B82E3401B04CB98
x64—64EAE0B1BAFD6798CD0D0D634B2F5C2F7131944E8CA1D25B670B3F87BEC563FF
arm64—402471EE97118C5DF3F7D211FC03F177EB5D1DBE5264BE814C6243D4F3D9DDDB
0.4.10
x86—873366975C19AEF30A1B230F3A66ACB66E1E7FDD796248C3D602DACE05725B67
x64—872D1C5AC32EFCE01E93821E790DEDC8C055B499F524F1250270679562BF3792
arm64—EF9B5D6C643AE2EF2D73B60A0706E3303C5D1EAB6A7C3E909AB95E693827BE2E
0.4.9
x86—36E9E7BEC5F4BBA3868119B0C58142F042A3811C4E61E42CF12761466A75C00E
x64—E49A7C8FEDB4F16038556E19C8BF7A68FFAE46445EF693B28C1FA461F03DF2C7
arm64—9EBA043C3345FF669C5587811D7ACEAD1ABCAD8089F467579F2AD4B136F771A5
0.4.8
x86—78B08AF72710B4777C88C38C82EED0F259CEF45DF2FEECA1A503B4DE25ECAD46
x64—7C17DBA682812AB24E04A4982DCCC228DBF74B695444BD9FA8CBB8C1DC78664C
arm64—774B8D3B2B64A4C16B2F5555493F8B50983AFB88E43393B33230C1FE5C0B2A02
0.4.4
x86—399ADA11455FF90D4C60CAF851371AF56B979D52CFEB54F7D9A30A95EA0F4246
x64—C6B503E858A7BA17DF47618D1C5B0331132B70BCC2A35704E5F422D21C433ABE
arm64—3C9C98FE5B3535C7195DD466636412B6179F43E90BBAFECA3240D0A79D7FEA89
0.4.3
x86—8F8EF65E567CA066CFB736DC3D76E1DB174F2CD77E8CC30659C9B9ED4E990698
x64—8105CEC75F5F60B2B1B499F9E57453DAC1BE835CF2E67AE141C47D6FAA88B84D
arm64—24498F658617ECC4B17CA1B23065BB7203BB756ECF9E93629C093EC46A40C548
0.4.1
x86—28C1CC65D4494CF6E2C3F26BDBE968BACAE7EFDBB479A0E9AB195125E95040CD
x64—119D00B9A7914A779491F80585754A8C4D2E87761AC41394A744C3A315AF4AAB
arm64—A73A3E58912B325CEA1ABF823E2D0FBFF7697A7F88F0FF5D669EC77C779CC3B3
0.4.0
x86—EB6632C7A8880E9BC0A4AFACC9C8F0FDE987AB50092476B13A7DC2AE0F56722F
x64—8180EBAB47427C4ADC029B02B2E91E743CAD01F7335063D6E28A0E7748F724F7
arm64—92C7107DDEC8309D65ACBD2E0DA8FF4D9A27A026C777980F40FD2BE5A9BEBA25
0.3.13
x86—62C0915CF6E56AF7943E40F4562C36FFA35B27DA11B6C4B490B7861747223ACD
x64—CA32A6451CFDD22A27D99313B3A2F91EB0CE6D191EB8E35E2467F1551252EBBB
arm64—892CB69E81C5C77C8AF23DD930D4BCF578B8F62765EE00E3BA8FB76D2035EB34
0.3.12
x86—D68768A44B44040D30114BAF066365DDAFF0BDF57441094D85A42CD2143792E1
x64—B75CDAE3279806C7A046B18C45C601FE3EC1A380F11911BC39C5273100E18FCE
arm64—6F69D45AA32571E9C34104564DD06A32B7AEEC9802831A00A5074FA1A89D5BA9
0.3.11
x86—C6219D7F2BFD8A5830217D76454095FB3DCD8084BAA5826DDA9CEB8A492893C2
x64—A40604C7A10E6876423FB53CE3325615A2E90B5B3F09E15676B1D2FE74E56948
arm64—DA0465BD86021265089387465C4D4D7A794966FA1CF86920C79CB0E9B98665BA
0.3.10
x86—0A2BCB7FCE05C5B1A88E09B6AAD0144AC723E5E1C713F917CE84D1433A73FA8C
x64—43B85E061BBCF6FEBB9973A7859D029F29F5DDEEB7722BD234422D8B6BEE4406
arm64—4A6DE3FF0FC2049CA72B8AB0EC567E195362A22C7EFCCA7EF0824B36B55D4193
0.3.9
x86—5D72FD7D720A1469931551DB30BA90547D8E64C9F02F2CC2D7A1D1E4F8E8C23C
x64—A260094190979A6B2AA6E0BEF02121A21E8C2715C2D91603F2763123BFC7F902
arm64—B2FA54C2C6C43CF447A043551E68201C103C2D22692345A29622DB8AF9C3CE4E
0.3.8
x86—4968EF6B88764FA06BAAA31A051558AE425D17C9FF7D0237594A3BC899E00B66
x64—1DA2735C31548DACD2751F90C15B5F643AA72F3053F366636F95153EE2C7186E
arm64—5CEB73FE9E18A987A498CED9B98A183D4110E3FDB534070D2D9911F860319E9F
0.3.6
x86—0F0BF7E7B0987BC355BC7674102FE904856060302956DC31EAA530BC2ED53BB8
x64—71D02992997E3FC7A3CF1877FEBF385BC299CDBE397D1B7B2E57F8BC3D0A14E8
arm64—25DEB159D13E5D3C2C19C365CF9866C6FF142D5B2BBB91AC1C5C632CD48657DA
0.3.5
x86—B4EDCE3F363EC4227ABECC30BB7FFC77CC4F18625B2E9049DE0F5AFA3A36BB8C
x64—D7F0877D54533376186B31455F3C23F226EAECAA4FF9E8169D5BD1670F594525
arm64—D50973DFA1E4416F13F463AA29470BA830977707782BB5ADB3DA10FEC0E66A52
0.3.4
x86—D997133B64DC8D5A90C6DBE361E6867D8366CC77BB29093A22B2D6DCC75FC6F1
x64—21C6E119D58443A696BD585946A6FAC8FA0B918A2D975F623157C3F72994A2F3
arm64—3ECF22C863DE4D054B14C70FB7B6A3EAD17DE5B8E40E36C24F76B5AA13B03664
0.3.3
x86—CDA2F98C15BA0B43646CA1945DBB9720B0A468B1DEBB508362C25A4735DB84B0
x64—C829796E1DDAD21E82EEF768CEE01469880CAFF7B073A2F1C01073FE075D8BA7
arm64—F7A1611C879E9FB27D01FD1B9EEBD469DE6204530ACB331B5E5B37F5054C2BC8
0.3.2
x86—F983E4E132ACAED85BA6B5D2D4ADC854F89EBF2EDAE08135720C40FB33FA1149
x64—4AAF87523D3588090A6F547A5ECA379264DDB287E3A424A1FAB73ACA6CD9C0C0
arm64—14694B2623FFFA38402DBDC1C2208C91400557FD44F7083160853E6027B125D7