From 85a7d458f9be9fbc67b5f3fa39075b9d46094c0d Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Mon, 11 Nov 2024 15:58:31 +0100 Subject: [PATCH] docs(tools): mention how to use extras (#8972) ## Summary Figured this could be helpful to mention in the documentation, as it might not be obvious that this is possible. ## Test Plan Tested the commands locally. --- docs/guides/tools.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/guides/tools.md b/docs/guides/tools.md index bd9d8c644..f6022940c 100644 --- a/docs/guides/tools.md +++ b/docs/guides/tools.md @@ -93,6 +93,20 @@ $ uvx --from 'ruff>0.2.0,<0.3.0' ruff check Note the `@` syntax cannot be used for anything other than an exact version. +## Requesting extras + +The `--from` option can be used to run a tool with extras: + +```console +$ uvx --from 'mypy[faster-cache,reports]' mypy --xml-report mypy_report +``` + +This can also be combined with version selection: + +```console +$ uvx --from 'mypy[faster-cache,reports]==1.13.0' mypy --xml-report mypy_report +``` + ## Requesting different sources The `--from` option can also be used to install from alternative sources.