Installation¶
prek provides multiple installation methods to suit different needs and environments.
Standalone Installer¶
The standalone installer automatically downloads and installs the correct binary for your platform:
Linux and macOS¶
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.2.0-alpha.2/prek-installer.sh | sh
Windows¶
powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/download/v0.2.0-alpha.2/prek-installer.ps1 | iex"
Package Managers¶
PyPI¶
Install via pip, uv (recommended), or pipx:
# Using uv (recommended)
uv tool install prek
# Using pip
pip install prek
# Using pipx
pipx install prek
Homebrew (macOS/Linux)¶
mise (Cross-platform)¶
Build from Source¶
Using Cargo¶
Download from GitHub Releases¶
Pre-built binaries are available for download from the GitHub releases page.
Updating¶
If you installed via the standalone installer, you can update to the latest version:
For other installation methods, follow the same installation steps again.
Shell Completion¶
prek supports shell completion for Bash, Zsh, Fish, and PowerShell. To install completions: