Skip to content

Commit

Permalink
Touchups to tools guide (#5202)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Jul 19, 2024
1 parent 0d9d559 commit 149c612
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions docs/guides/tools.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Using tools

Many Python packages provide command-line tools. uv has specialized support for invoking tools provided by these packages without installing them into your environment.
Many Python packages provide command-line interfaces which are useful as standalone tools. uv has specialized support for easily invoking and installing tools.

## Using `uvx`

Expand All @@ -18,7 +18,7 @@ Note this is exactly equivalent to:
$ uv tool run ruff
```

Arguments can be passed to the tools:
Arguments can be passed afted the tool name:

```console
$ uvx pycowsay hello from uv
Expand Down Expand Up @@ -52,14 +52,20 @@ To run a tool at a specific version, use `command@<version>`:
$ uvx [email protected] check
```

The `--from` option can also be used to specify package versions:
The `--from` option can also be used to specify package versions, as above:

To constrain to a range of versions:
```console
$ uvx --from 'ruff==0.3.0' ruff check
```

Or, to constrain to a range of versions:

```console
$ 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 different sources

The `--from` option can also be used to install from alternative sources.
Expand Down

0 comments on commit 149c612

Please sign in to comment.