
Company News
Meet the Socket Team at RSAC and BSidesSF 2026
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.
pre-commit-uv
Advanced tools
Use uv to create virtual environments and install packages for pre-commit.
With pipx:
pipx install pre-commit
pipx inject pre-commit pre-commit-uv
With uv:
uv tool install pre-commit --with pre-commit-uv --force-reinstall
Compared to upstream pre-commit will speed up the initial seed operation. In general, upstream recommends caching the
pre-commit cache, however, that is not always possible and is still helpful to have a more performant initial cache
creation., Here's an example of what you could expect demonstrated on this project's own pre-commit setup (with a hot
uv cache):
❯ hyperfine 'pre-commit install-hooks' 'pre-commit-uv install-hooks'
Benchmark 1: pre-commit install-hooks
Time (mean ± σ): 54.132 s ± 8.827 s [User: 15.424 s, System: 9.359 s]
Range (min … max): 45.972 s … 66.506 s 10 runs
Benchmark 2: pre-commit-uv install-hooks
Time (mean ± σ): 41.695 s ± 7.395 s [User: 7.614 s, System: 6.133 s]
Range (min … max): 32.198 s … 58.467 s 10 runs
Summary
pre-commit-uv install-hooks ran 1.30 ± 0.31 times faster than pre-commit install-hooks
Once installed will use uv out of box, however the DISABLE_PRE_COMMIT_UV_PATCH environment variable if is set it
will work as an escape hatch to disable the new behavior.
To avoid interpreter startup overhead of the patching, we only perform this when we detect you calling pre-commit.
Should this logic fail you can force the patching by setting the FORCE_PRE_COMMIT_UV_PATCH variable. Should you
experience this please raise an issue with the content of the sys.argv. Note that DISABLE_PRE_COMMIT_UV_PATCH will
overwrite this flag should both be set.
FAQs
Run pre-commit with uv
We found that pre-commit-uv demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.

Research
/Security News
Malicious Packagist packages disguised as Laravel utilities install an encrypted PHP RAT via Composer dependencies, enabling remote access and C2 callbacks.

Research
/Security News
OpenVSX releases of Aqua Trivy 1.8.12 and 1.8.13 contained injected natural-language prompts that abuse local AI coding agents for system inspection and potential data exfiltration.