Conversation
…install-hooks` to `prek install --prepare-hooks` This renames the hook environment setup surface from `install-hooks` to `prepare-hooks` to make the distinction between two different actions clearer: - `prek install` installs Git hook shims under .git/hooks - `prek prepare-hooks` prepares the managed hook environments and caches The old naming used "install" for both concepts, which was easy to misread, especially in forms like `prek install --install-hooks`. The new names make the behavior more explicit: - prek install --prepare-hooks - prek prepare-hooks Compatibility is preserved, so existing workflows continue to work.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a dedicated documentation page describing prek’s compatibility/aliasing with upstream pre-commit, and links it from existing docs + site navigation.
Changes:
- Add a new “Compatibility with pre-commit” page documenting supported aliases and notable missing upstream commands.
- Link the new page from the “Differences from pre-commit” doc for easier discovery.
- Register the new page in MkDocs navigation (including the
llmstxtsection list).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| mkdocs.yml | Adds compatibility.md to nav and llmstxt sections so it appears in the rendered site and generated LLM docs. |
| docs/diff.md | Adds a pointer to the new compatibility-focused command mapping and updates the cache command bullets. |
| docs/compatibility.md | Introduces the new compatibility page describing command/flag aliases and portability guidance. |
Comment on lines
+10
to
+19
| Only the commands and flags below differ from the preferred `prek` spelling. The compatibility forms are still accepted so existing scripts do not break. | ||
|
|
||
| - `prek install-hooks` still works, but `prek prepare-hooks` is the preferred spelling. | ||
| - `prek install --install-hooks` still works, but `prek install --prepare-hooks` is the preferred flag spelling. | ||
| - `prek autoupdate` still works, but `prek auto-update` is the preferred spelling. | ||
| - `prek gc` still works as a hidden compatibility command, but `prek cache gc` is preferred. | ||
| - `prek clean` still works as a hidden compatibility command, but `prek cache clean` is preferred. | ||
| - `prek init-templatedir` and `prek init-template-dir` still work as hidden compatibility commands, but `prek util init-template-dir` is preferred. | ||
| - `pre-commit hazmat` is not implemented in `prek`. | ||
| - `pre-commit migrate-config` is not provided as a direct command. Use `prek util yaml-to-toml` if you want to migrate from YAML to `prek.toml`. |
There was a problem hiding this comment.
The lead-in text says "Only the commands and flags below differ from the preferred prek spelling", but the list also includes non-spelling differences (e.g., pre-commit hazmat not implemented and migrate-config not provided). Consider rewording this paragraph to cover both alias/name differences and commands that are intentionally missing, so the section is internally consistent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.