Skip to content

Document compatibility with pre-commit#1767

Merged
j178 merged 2 commits intomasterfrom
compat-doc
Mar 10, 2026
Merged

Document compatibility with pre-commit#1767
j178 merged 2 commits intomasterfrom
compat-doc

Conversation

@j178
Copy link
Copy Markdown
Owner

@j178 j178 commented Mar 10, 2026

No description provided.

j178 added 2 commits March 10, 2026 12:10
…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.
Copilot AI review requested due to automatic review settings March 10, 2026 05:01
@j178 j178 added the documentation Improvements or additions to documentation label Mar 10, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 llmstxt section 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`.
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Base automatically changed from rename to master March 10, 2026 05:06
@j178 j178 merged commit ec2c03f into master Mar 10, 2026
22 checks passed
@j178 j178 deleted the compat-doc branch March 10, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants