--- id: pre-commit-uv version: "4.3.0" license: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,… (full text in the JSON record) license_treatment: permissive maintenance: active --- # pre-commit-uv — Run pre-commit with uv License: permissive · Maintenance: active · Downloads: 722.1K/mo ## What it is and what it does pre-commit-uv is a plugin that replaces pre-commit's default virtual environment and package installation mechanism with uv, a faster Rust-based Python package installer. It works by patching pre-commit at runtime to use uv instead of the standard tools, transparently speeding up the initial hook installation and environment setup without requiring changes to your pre-commit configuration. The package is installed as an injection into an existing pre-commit installation (via pipx inject) or alongside it (via uv tool install). Once active, it automatically intercepts pre-commit's environment creation calls and delegates them to uv, which typically reduces hook installation time by roughly 30% according to the project's own benchmarks. It includes escape hatches via environment variables to disable the patching if needed, and only applies the patch when pre-commit is actually invoked to avoid startup overhead. Use it for: - Speed up initial pre-commit hook installation in CI/CD pipelines where cache is unavailable or ephemeral. - Reduce local development setup time when running pre-commit install-hooks for the first time on a new machine. - Replace pre-commit's default package installer in projects where uv is already the standard tool. - Maintain faster hook environments in monorepos or projects with many dependencies. - Disable selectively on specific machines or environments using the DISABLE_PRE_COMMIT_UV_PATCH variable. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Integrates uv as the virtual environment and package installer for pre-commit, speeding up hook installation and environment setup. Yes, if you use pre-commit and want faster initial hook installation without configuration changes. The low install friction, active maintenance, permissive license, and demonstrated performance gain (roughly 30% faster in the benchmark) make it a straightforward win. Install via pipx inject or uv tool install, and it works transparently. No known vulnerabilities. ## Install pip install pre-commit-uv uv add pre-commit-uv poetry add pre-commit-uv ## Installing pre-commit-uv Before you install: Low friction install as a pure Python wheel. Actively maintained with a recent release; repository shows steady activity and no archived status. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both commercial and personal projects. Quickstart: pipx inject pre-commit pre-commit-uv Then use pre-commit normally; pre-commit-uv will automatically patch pre-commit to use uv for environment creation and package installation. Requires pre-commit to already be installed; works with Python 3.10 or later. Verify before relying: - Whether the 1.30x speedup shown in the benchmark holds across different project configurations and cache states. - Compatibility with all pre-commit hook types and custom hook configurations. - Whether the DISABLE_PRE_COMMIT_UV_PATCH and FORCE_PRE_COMMIT_UV_PATCH environment variables cover all edge cases. ## Package facts - License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 722.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pre-commit uv integration, faster pre-commit hook installation, uv virtual environment manager, pre-commit performance optimization, uv package installer for hooks, pre-commit-plugin, performance-optimization [View on SkillFed](https://skillfed.io/packages/pre-commit-uv) · [View on PyPI](https://pypi.org/project/pre-commit-uv/)