I didn’t technically learn all of this today, but I’ve slowly been learning new things about UV almost daily. Here are some of the awesome things uv tool can do:

  1. With uv tool run, you can run commands to test things without the need to install them. Example, uv tool run pycowsay "hi". This will run the pycowsay command with the argument hi. I was curious if the python package was cached and if so, how it was cached. So I asked, and @charliermarsh said the package is cached and updated frequently.
  2. Is uv tool run pycowsay "hi" too long to type? UV has you covered with the uvx alias, you can use uvx pycowsay "hi" instead.
  3. Do you have a tool you use all the time and want it installed in its own isolated environment? You can use uv tool install to install it. Example, uv tool install ruff. Curious where it was installed to? You can use uv tool dir to find out.
  4. Want to upgrade a tool or all tools? You can use uv tool upgrade ruff to upgrade the ruff tool or uv tool upgrade --all to upgrade all tools.

Want more details? Check out UV’s documentation.