2.0 KiB
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
{% include-markdown "../README.md" start="" end="" %}
Windows
{% include-markdown "../README.md" start="" end="" %}
Package Managers
PyPI
Install via pip, uv (recommended), or pipx:
{% include-markdown "../README.md" start="" end="" %}
Homebrew (macOS/Linux)
{% include-markdown "../README.md" start="" end="" %}
mise
{% include-markdown "../README.md" start="" end="" %}
Build from Source
{% include-markdown "../README.md" start="" end="" %}
Download from GitHub Releases
{% include-markdown "../README.md" start="" end="" %}
Updating
{% include-markdown "../README.md" start="" end="" %}
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:
Bash
COMPLETE=bash prek > /etc/bash_completion.d/prek
Zsh
COMPLETE=zsh prek completion > "${fpath[1]}/_prek"
Fish
COMPLETE=fish prek > ~/.config/fish/completions/prek.fish
PowerShell
COMPLETE=powershell prek >> $PROFILE
Use in GitHub Actions
{% include-markdown "../README.md" start="" end="" %}