Skip to content

Documentation for prek install is unclear; mixed use of prek hooks and git hooks #1775

@stewartadam

Description

@stewartadam

Summary

The documentation for prek install is not very clear, and doesn't differentiate between flags that operate against Git hooks or Prek hooks:

$ prek install --help
Install prek as a git hook under the `.git/hooks/` directory

Usage: prek install [OPTIONS] [HOOK|PROJECT]...

Arguments:
  [HOOK|PROJECT]...  Include the specified hooks or projects

Options:
      --skip <HOOK|PROJECT>    Skip the specified hooks or projects
  -f, --overwrite              Overwrite existing hooks
      --install-hooks          Create environments for all hooks used in the config file
  -t, --hook-type <HOOK_TYPE>  Which hook type(s) to install [possible values: commit-msg, post-checkout, post-commit, post-merge, post-rewrite, pre-commit, pre-merge-commit, pre-push, pre-rebase, prepare-commit-msg]
      --allow-missing-config   Allow a missing configuration file
      --git-dir <GIT_DIR>      Install hooks into the `hooks` subdirectory of the given git directory (`<GIT_DIR>/hooks/`)

It looks like prek install was intended to operate on Git hooks but:

  • --skip is a reference to a prek hook, not a Git hook
  • -f, --overwrite refers to the Git hooks
  • --install-hooks refers to Prek hooks
  • -t, --hook-type refers to Git hooks

Willing to submit a PR?

  • Yes — I’m willing to open a PR to fix this.

Platform

MacOS 15

Version

prek 0.3.5 (46cb7ba 2026-03-09)

.pre-commit-config.yaml

N/A

Log file

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions