Using uvx in GitHub Actions in a cache-friendly way
AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.
Why it matters
CI workflows can stop re-downloading Python tools from PyPI on every run by pinning a date in the UV_EXCLUDE_NEWER variable and baking it into the cache key.
Simon Willison published a recipe for running Python tools inside GitHub Actions, the automation system that runs code when software projects change. Normally each run downloads the tool again from PyPI, the public Python package store. His trick sets a variable called UV_EXCLUDE_NEWER to a fixed date, so every run uses the version of the tool that existed on that date, and reuses it from GitHub's cache. Upgrading tools later means manually bumping the date.
Teams running Python tooling in GitHub Actions typically pay, in time and network load, for repeated PyPI downloads on every workflow run. Willison's recipe fixes this by fixing a resolution date (he used 2026-07-12) via the UV_EXCLUDE_NEWER environment variable and including it in the cache key, so runs reuse cached tools until someone bumps the date. The trade-off is manual cache-busting on upgrades.
Willison's recipe sets UV_EXCLUDE_NEWER="2026-07-12" as an environment variable at workflow start and uses the value in the GitHub Actions cache key. uvx then resolves tool versions as of that date on the first run and subsequent runs hit the Actions cache instead of PyPI. Upgrades require manually bumping the date. He also links an open issue on astral-sh/setup-uv requesting caching by default rather than purging wheels.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
A hierarchical note-taking app for building large personal knowledge bases
Trilium lets users build and navigate massive personal knowledge bases without duplicating content, saving time on organization and retrieval.
Desktop apps in Go with native UI or web frontend
Go developers can now ship cross-platform desktop and mobile apps in a single small binary without cgo or heavy runtimes, cutting build complexity and deployment size.
OpenBitFun: an agent workspace with four harness modes and phone remote control
OpenBitFun lets agents run on any machine and be controlled from a phone, eliminating the need to choose between local power and remote access, saving developers time switching contexts.
Intel One Mono: a monospaced font designed with low-vision developers
Developers with low vision or eye fatigue can read code more clearly, reducing errors and improving productivity.