Simon Willison presents a method for using `uvx tool-name` in GitHub Actions workflows that avoids hitting PyPI on every run. The approach involves setting the `UV_EXCLUDE_NEWER` environment variable to a specific date and incorporating that date into the GitHub Actions cache key.
- Setting `UV_EXCLUDE_NEWER: "2026-07-12"` ensures tools resolve to versions available as of that date.
- Including this date in the cache key allows users to bust the cache and upgrade tools by simply bumping the date forward.
- This strategy prevents fresh downloads of tools and their dependencies for each workflow execution.
This technique helps maintain fast CI/CD pipelines by caching Python tool environments effectively.