NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #209 most downloaded on PyPI
A framework for managing and maintaining multi-language pre-commit hooks.
Last release 1 months ago
10 Aug 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
204 releases · first in 2014
Prevent infinite recursion of post-checkout on clone
Fix DeprecationWarning on python3.9 for random.shuffle method
PRE_COMMIT=1 environment variable when running hooks
UnicodeDecodeError on windows when using the py launcher to detect executables with non-ascii characters in the path
DeprecationWarning on python3.9 for random.shuffle method
files / exclude use forward slashes on windows as well.
One column per quarter.
Add support for post-commit hooks
post-commit hooks
healthy() when upgrading operating systems.
language: python_venv is now an alias to language: python (and will be removed in a future version).
healthy() check.
pre-commit autoupdate now tries to maintain quoting style of rev.
repo: local.
post-checkout hook.
GEM_PATH is set globally.
pre-commit autoupdate / pre-commit migrate-config are run but the pre-commit configuration is not valid yaml.
Calculate character width using east_asian_width
east_asian_width
language_version: system by default for node hooks if node / npm
are globally installed.
git commit
hook-impl
pip on windows
pre-commit autoupdate
Add support for the post-checkout hook
post-checkout hook
--from-ref / --to-ref aliases for --source / --origin
--commit-msg-filename is passed for commit-msg / prepare-commit-msg.
healthy() check when python executable goes missing.
Temporarily restore python 3.6.0 support (broken in 2.0.0)
Replace aspy.yaml with sort_keys=False.
aspy.yaml with sort_keys=False.
perl.
.git/hooks/* shebang creation when pythons are in /usr/local/bin.
Fix ImportError in python 3.6.0 / 3.6.1 for typing.NoReturn
ImportError in python 3.6.0 / 3.6.1 for typing.NoReturn
Expose PRE_COMMIT_REMOTE_NAME and PRE_COMMIT_REMOTE_URL as environment variables during pre-push hooks.
PRE_COMMIT_REMOTE_NAME and PRE_COMMIT_REMOTE_URL as environment
variables during pre-push hooks.
python -m pre_commit --version to mention pre-commit instead of
__main__.py.
GIT_SSL_NO_VERIFY from environment when cloning.
pre-commit init-templatedir to succeed even if core.hooksPath is
set.
pcre language, use pygrep instead.
--tags-only argument to pre-commit autoupdate (it has done
nothing since 0.14.0).
Add top-level configuration files for file selection.
conda as a new language.
files for file selection.
--verbose / verbose to be more consistent with normal runs.
pre-merge-commit git hook.
pre-commit autoupdate --freeze which produces "frozen" revisions.
--verbose.
.git.
git has since fixed this bug: git/git@36fd304dGIT_SSL_CAINFO is necessary.
pre-commit try-repo for bare, on-disk repositories.
pre-commit autoupdate to improve terminal autolink.
Allow building newer versions of ruby.
ruby.
pre-commit sample-config.
Allow --hook-type to be specified multiple times.
--hook-type to be specified multiple times.
pre-commit install --hook-type pre-commit --hook-type pre-pushpty.
importlib.metadata directly when running in python 3.8
files: regexnot executable instead of not found.
healthy() check when current working directory contains modules which shadow standard library names.
Fix node_modules plugin installation on windows
node_modules plugin installation on windows
Make default python lookup more deterministic to avoid redundant installs
Fix installation of rust hooks with new cargo
rust hooks with new cargo
Use the current running executable if it matches the requested language_version
language_version
pre-commit autoupdate now supports non-master default branches
pre-commit init-templatedir which makes it easier to automatically enable pre-commit in cloned repositories.
PRE_COMMIT_COLOR={auto,always,never}
TERM=dumb
docker based hooks on windows
tox --devenv ...
Warn on unknown keys at the top level and repo level
^C
^C in wrapper script in python 3.x
rmtree for non-writable directories
--color option to git diff in --show-diff-on-failure
pre-commit is installed globally
Don't UnicodeDecodeError on unexpected non-UTF8 output in python health check on windows.
UnicodeDecodeError on unexpected non-UTF8 output in python health check on windows.
Add support for prepare-commit-msg hook
prepare-commit-msg hook
pre-commit install on windows
Fix cloning non-branch tag while in the fallback slow-clone strategy.
Fix command length calculation on posix when SC_ARG_MAX is not defined.
SC_ARG_MAX is not defined.
No longer require being in a git repo to run pre-commit clean / gc / sample-config.
git repo to run pre-commit clean / gc / sample-config.
minimum_pre_commit_version top level key to require a new-enough version of pre-commit.
pre-commit run --all-files --show-diff-on-failure.
try-repo for staged untracked changes.
#!/usr/bin/env python3 in hook template.
git.no_git_env()
Don't filter GIT_SSH_COMMAND env variable from git commands
GIT_SSH_COMMAND env variable from git commands
git
GIT_EXEC_PREFIX env variable from git commands
Improve performance of filename classification by 45% - 55%.
go hooks while GOBIN environment variable is set.
pre-commit migrate-config / pre-commit autoupdate with an empty configuration file.
Make the hook shebang detection more timid (1.14.0 regression)
Fix python executable lookup on windows when using conda
Add an alias configuration value to allow repeated hooks to be differentiated
alias configuration value to allow repeated hooks to be differentiated
identity meta hook which just prints filenames
cached-property and improve startup performance by ~10%
pre-commit try-repo to clone uncommitted changes on disk.
pre-commit gc which will clean up no-longer-referenced cache repos.
default_language_version to streamline overriding the language_version configuration in many places
default_stages to streamline overriding the stages configuration in many places
#!/usr/bin/env python3)
--files / --config:
pre-commit run --files x outside of a git dir no longer stacktracespre-commit run --config ./relative while in a sub directory of the git repo is now able to find the configurationpre-commit run --files ... no longer runs a subprocess per file (performance)pre-commit try-repo ./relative while in a sub directory of the git repo is now able to clone properly
meta repos cannot have a language other than system
git add --intent-to-add added
--no-gpg-sign when running tests
individual hooks may opt out of parallel exection with require_serial: true
require_serial: truexargs command length detection
pre-commit autoupdate when updating to a latest tag missing a .pre-commit-hooks.yaml
pre-commit-hooks version in pre-commit sample-config
ruby hooks work with latest gem by removing --no-ri / --no-rdoc and instead using --no-document.
--no-gpg-sign when running tests
require_serial: true to avoid the new parallel execution.ruby hooks now require gem>=2.0.0. If your platform doesn't support this by default, select a newer version using language_version.Install multi-hook repositories only once (performance)
check-useless-exclude now considers types
check-useless-exclude now considers types
pre-push hook was not identifying all commits on push to new branch
Fix .git dir detection in git<2.5 (regression introduced in 1.10.5)
.git dir detection in git<2.5 (regression introduced in 1.10.5)
Add new fail language which always fails
fail language which always fails
ResourceWarnings for unclosed files
Work around PATH issue with brew python on macos
PATH issue with brew python on macos
pre-commit install inside a worktree
Replace yaml.load with safe alternative
yaml.load with safe alternative
yaml.load can lead to arbitrary code execution, though not where it was used./exe)
--show-diff-on-failure
language_version: python3 for python_venv when running in python2
pre-commit run X only run X and not hooks with stages: [...]
Fix pre-push during a force push without a fetch
pre-push during a force push without a fetch
pre-commit now invokes hooks with a consistent ordering of filenames
python_venv language would leak dependencies when pre-commit was installed in a -mvirtualenv virtualenv
python_venv language would leak dependencies when pre-commit was installed in a -mvirtualenv virtualenv
Add support for hooks written in rust
rust
Add new python_venv language which uses the venv module instead of virtualenv
python_venv language which uses the venv module instead of virtualenv
LICENSE in distribution
pre-commit try-repo
Fix cloning relative paths (regression in 1.7.0)
Fix integration with go 1.10 and pkg directory
pkg directory
git<1.8.5 (inadvertantly removed in 1.7.0)
pkg directory
git<1.8.5 (inadvertently removed in 1.7.0)
Add a manual stage for cli-only interaction
manual stage for cli-only interaction
--multiline option to pygrep hooks
pre-commit config validation was split to a separate cfgv library
cfgv library
--repo to be specified multiple times to autoupdate
rev as a preferred alternative to sha in .pre-commit-config.yaml
--clean-src option when invoking nodeenv to save ~70MB per node env
core.hooksPath set
additional_dependencies now get isolated environments
pre-commit migrate-config to convert sha to rev in the
.pre-commit-config.yaml file.Hooks now may have a verbose option to produce output even without failure
verbose option to produce output even without failure
bash
git called them
proper detection for root commit during pre-push
pre-commit now supports node hooks on windows.
PrefixedCommandRunner -> Prefix
Fix local golang repositories with additional_dependencies.
local golang repositories with additional_dependencies.
Invoke git diff without a pager during --show-diff-on-failure.
git diff without a pager during --show-diff-on-failure.
pre-commit on windows can find pythons at non-hardcoded paths.
pre-commit on windows can find pythons at non-hardcoded paths.
pre-commit no longer clears GIT_SSH environment variable when cloning.
pre-commit no longer clears GIT_SSH environment variable when cloning.
pre-commit autoupdate --repo ... no longer deletes other repos.
pre-commit autoupdate --repo ... no longer deletes other repos.
When running pre-commit run , pre-commit will only install the necessary repositories.
pre-commit run <hookid>, pre-commit will only install the necessary repositories.repo: meta hooks.
meta hooks expose some linters of the pre-commit configuration itself.id: check-useless-excludes: ensures that exclude directives actually apply to any file in the repository.id: check-hooks-apply: ensures that the configured hooks apply to at least one file in the repository.pre-commit autoupdate --repo ...Add pre-commit try-repo commands
pre-commit try-repo commands
try-repo takes a repo and will run the hooks configured in that hook repository.pre-commit try-repo https://github.com/pre-commit/pre-commit-hookspre-commit try-repo can also take all the same arguments as pre-commit run.pygrep aims to be a more cross-platform alternative to pcre hooks.
pygrep language
pygrep aims to be a more cross-platform alternative to pcre hooks.pipes.quote for executable path in hook template
--config not being respected in some situationsfile:// protocol for cloning under test
file:// clone paths being treated as urls for golangctypes as an import for virtualenv healthchecks
pre-commit can successfully install commit-msg hooks
pre-commit also checks the ssl module for virtualenv health
ssl module for virtualenv health
pre-commit configuration gains a fail_fast option.
fail_fast option.
fail_fast defaults to false.exclude option.
Fix a regression in the return code of pre-commit autoupdate
pre-commit autoupdate
pre-commit migrate-config and pre-commit autoupdate return 0 when successful.In a later release, list-based configurations will issue a deprecation warning.
pre-commit will now be following semver. Thanks to all of the contributors that have helped us get this far!
pre-commit's cache directory has moved from ~/.pre-commit to $XDG_CACHE_HOME/pre-commit (usually ~/.cache/pre-commit).
pre-commit clean now cleans up both the old and new directory.A new configuration format for .pre-commit-config.yaml is introduced which
will enable future development.
repos key.pre-commit migrate-config has been introduced to "upgrade" the configuration format to the new map-based configuration.pre-commit autoupdate now automatically calls migrate-config.+repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
sha: v0.9.2
hooks:
pre-commit migrate-config to convert .pre-commit-config.yaml to the new map format.~/.pre-commit to ~/.cache/pre-commit.Allow --config to affect pre-commit install
pre-commit installpre-push / commit-msgYour coding agent can read these notes before it upgrades. Set up the MCP server →