Detects uv projects
pyproject.toml and uv.lock mark uv-managed projects.
A small Go CLI that installs Codex and OpenCode hooks, detects
Python-related shell commands, and routes them toward the matching
uv workflow.
python app.py
uv run app.py
Install binary
The installer downloads the matching archive for your OS and CPU,
verifies it against checksums.txt, and installs the
binary into a user-level directory.
powershell -ExecutionPolicy ByPass -c "irm https://github.com/jinxiao/python-uv-hooks-4-ai/releases/latest/download/install.ps1 | iex"
curl -LsSf https://github.com/jinxiao/python-uv-hooks-4-ai/releases/latest/download/install.sh | sh
Workflow
uv project boundaries are respected. Poetry and PDM projects are left unchanged, while Python tools use uv-native execution paths.
python app.py
->
uv --cache-dir <temp>\uv-python-agent-hooks\uv-cache run app.py
pytest -q
->
uv --cache-dir <temp>\uv-python-agent-hooks\uv-cache run pytest -q
pip install requests
->
uv --cache-dir <temp>\uv-python-agent-hooks\uv-cache pip install requests
python -m venv
->
uv --cache-dir <temp>\uv-python-agent-hooks\uv-cache venv .venv
pyproject.toml and uv.lock mark uv-managed projects.
Poetry and PDM markers prevent rewriting commands in those projects.
Codex suggestions use a temporary uv cache by default.
Support status
Treat the repository as tested only for Windows with Codex CLI until other targets are validated.
Primary supported path for current release notes.
Available through explicit target installation.
Release assets and installers exist; validation is pending.
CLI reference
uv-python-hook install
uv-python-hook uninstall
uv-python-hook install --project --targets codex
uv-python-hook uninstall --project --targets codex
uv-python-hook doctor
uv-python-hook detect-project
uv-python-hook rewrite-command "pip install -r requirements.txt"
uv-python-hook rewrite-command --target opencode "python app.py"