uv tools / uvx
uv is a fast Python package manager. Two features are especially useful for real teams:
uv tool install: install CLIs in an isolated, reproducible wayuvx: run a CLI without installing it globally
Learning goals
- Ship internal devtools without “pip install on your machine” problems
- Pin CLI versions for reproducibility
- Use
uvxfor one-off tools in CI and scripts
Install a CLI tool (isolated)
bash
uv tool install ruff
ruff --version
This avoids polluting your global Python and reduces environment drift.
Run a tool without installing (uvx)
bash
uvx ruff --version
uvx httpie --help
This is great for:
- CI jobs
- workshop instructions
- running a tool once to validate something
Version pinning
bash
uvx ruff==0.8.4 check .
Pin versions in docs and CI so your outputs stay stable across semesters.
Mini-lab (optional)
Create a small course CLI tds:
tds lintruns ruff viauvxtds docs-checkvalidates links- publish it as a package (or keep it internal)
Where this fits
This complements Python Packaging and PyPI Publishing by making “run the tool” frictionless.