-
Notifications
You must be signed in to change notification settings - Fork 200
Documentation for prek install is unclear; mixed use of prek hooks and git hooks #1775
Copy link
Copy link
Closed
Description
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:
--skipis a reference to a prek hook, not a Git hook-f, --overwriterefers to the Git hooks--install-hooksrefers to Prek hooks-t, --hook-typerefers 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels