docs/reference/environment-variables.md
prek supports the following environment variables:
PREK_HOMEOverride the prek data directory (caches, toolchains, hook envs).
If beginning with ~, it is expanded to the user's home directory.
Defaults to ~/.cache/prek on macOS and Linux, and %LOCALAPPDATA%\prek on Windows.
PREK_COLORControl colored output: auto (default), always, or never.
PREK_QUIETControl quiet output mode.
Set to 1 for quiet mode (equivalent to -q, only shows failed hooks), or 2 for silent mode (equivalent to -qq, no output to stdout).
PREK_SKIPComma-separated list of hook IDs to skip (e.g. black,ruff). See Skipping Projects or Hooks for details.
PREK_ALLOW_NO_CONFIGAllow running without a configuration file (useful for ad-hoc runs).
PREK_NO_CONCURRENCYDisable hook and batch parallelism during prek run.
If set, force PREK_CONCURRENT_HOOKS and PREK_CONCURRENT_BATCHES to 1.
PREK_CONCURRENT_HOOKSSet the maximum number of hooks that can run at once during prek run (minimum 1).
Defaults to the number of CPU cores when unset.
Ignored when PREK_NO_CONCURRENCY is set.
PREK_CONCURRENT_BATCHESSet the maximum number of batches that each hook can run at once during prek run (minimum 1).
A batch is one hook command invocation over a subset of the matched filenames.
Defaults to the number of CPU cores when unset.
Ignored when PREK_NO_CONCURRENCY is set.
PREK_NO_FAST_PATHDisable Rust-native built-in hooks; always use the original hook implementation. See Built-in Fast Hooks for details.
PREK_UV_SOURCEControl how uv (Python package installer) is installed. Options:
github (download from GitHub releases)pypi (install from PyPI)tuna (use Tsinghua University mirror)aliyun (use Alibaba Cloud mirror)tencent (use Tencent Cloud mirror)pip (install via pip)If not set, prek automatically selects the best available source.
PREK_NATIVE_TLSUse the system trusted store instead of the bundled webpki-roots crate.
PREK_DOWNLOAD_CHECKSUM_POLICYControl checksum verification for managed toolchain downloads that use checksum sidecar files. Options:
warn-missing (default): verify downloads when a checksum is available; warn and continue when checksum metadata is missingrequired: require the checksum sidecar to be available and validdisabled: skip checksum fetching and verificationChecksum mismatches are hard errors whenever verification is enabled.
PREK_CONTAINER_RUNTIMESpecify the container runtime to use for container-based hooks (e.g., docker, docker_image).
Options:
auto (default, auto-detect available runtime)dockerpodmancontainer (Apple's Container runtime on macOS, see container)PREK_DOCKER_NO_INITDisable passing the runtime's --init flag when running docker and docker_image hooks.
This is a compatibility escape hatch for container environments that cannot run the init helper.
Disabling --init can leave containers running after Ctrl-C if the container's PID 1 does not handle forwarded signals.
PREK_RUBY_MIRROROverride the Ruby installer base URL used for downloaded Ruby toolchains (for example, when using mirrors or air-gapped CI environments).
Mirrors should provide release-compatible Ruby archive assets and a SHA256SUMS asset in the same release download location.
Only exact HTTPS GitHub repository mirrors (https://github.com/owner/repo, optionally with port 443) receive GITHUB_TOKEN; other mirrors are used without GitHub authentication.
See Ruby language support for details.
PREK_RUST_PROFILEOverride the rustup profile used when installing managed Rust toolchains (minimal, default, or complete). Defaults to minimal. Set to default to include rustfmt and clippy.
See Rust language support for details.
PRE_COMMIT_ALLOW_NO_CONFIGFallback for PREK_ALLOW_NO_CONFIG.
PRE_COMMIT_NO_CONCURRENCYFallback for PREK_NO_CONCURRENCY.
SKIPFallback for PREK_SKIP.