Project-entry automation
Pain point
Repository-local setup such as installing Git hooks is easy to forget, especially after a fresh clone or when switching between projects. Written reminders do not guarantee that the required local state exists.
The Mise enter hook performs small, safe setup actions that should be true whenever work begins.
What it does
- Finds the repository root.
- Installs Commitizen with
uv tool install commitizenwhenuvexists andczdoes not. - Installs the
prekpre-commit hook when missing. - Installs the
prekcommit-message hook when missing.
The checks make repeated entry safe. Existing valid hooks and tools are left alone.
Platform implementations
- Linux, macOS, and the dev container use
scripts/enter_project.sh. - Native Windows uses
scripts/enter_project.ps1.
The scripts intentionally have the same behavior. Any functional change must be made to both and syntax-checked on both platforms.
Why this is a hook
Tool versions belong in Mise, but Git-hook installation changes repository-local state. The enter hook is an appropriate boundary because it verifies that state without placing generated Git-hook files under version control.
Keep entry automation short. Slow builds, tests, network-heavy updates, and destructive actions do not belong here.