Document the tool upgrade command (#5947)

This commit is contained in:
Charlie Marsh
2024-08-09 09:19:38 -04:00
committed by GitHub
parent eed23be1bd
commit 7a0b610c19
2 changed files with 51 additions and 12 deletions
+24
View File
@@ -151,6 +151,30 @@ As with `uvx`, installations can include additional packages:
$ uv tool install mkdocs --with mkdocs-material
```
## Upgrading tools
To upgrade a tool, use `uv tool upgrade`:
```console
$ uv tool upgrade ruff
```
Tool upgrades will respect the version constraints provided when installing the tool. For example,
`uv tool install ruff >=0.3,<0.4` followed by `uv tool upgrade ruff` will upgrade Ruff to the latest
version in the range `>=0.3,<0.4`.
To instead replace the version constraints, re-install the tool with `uv tool install`:
```console
$ uv tool install ruff>=0.4
```
To instead upgrade all tools:
```console
$ uv tool upgrade --all
```
## Next steps
To learn more about managing tools with uv, see the [Tools concept](../concepts/tools.md) page and