1
0
mirror of https://github.com/j178/prek.git synced 2026-04-03 17:34:03 +02:00
Files
prek/docs/installation.md
2025-09-25 11:28:29 +08:00

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="" %}