LinuxCommandLibrary

uvx

Run Python tools in ephemeral environments

TLDR

Run Python tool

$ uvx [ruff] [check] [.]
copy
Run specific version
$ uvx [package]@[version] [args]
copy
Run with extras
$ uvx --with [extra] [package]
copy
Run from git
$ uvx [git+https://github.com/repo/tool]
copy

SYNOPSIS

uvx [--with extras] package[@version] [args]

DESCRIPTION

uvx is a shorthand for uv tool run that executes Python command-line tools in temporary, isolated environments without permanently installing them. It is similar to pipx run but leverages uv's Rust-based resolver for dramatically faster execution.
Each invocation creates an ephemeral virtual environment, installs the requested tool and its dependencies, runs the command, and then discards the environment. This ensures tools don't conflict with each other or with project dependencies. Specific versions can be pinned using the @version syntax.
uvx is part of the uv Python package manager ecosystem and is useful for running one-off tools like linters, formatters, and code generators without cluttering the system with permanent installations.

PARAMETERS

package

Package to run.
--with EXTRA
Include extra.
--from SOURCE
Install source.
--python VER
Python version.

CAVEATS

Requires uv. Python ecosystem. May download packages.

HISTORY

uvx is part of uv, the fast Python package manager, providing ephemeral tool execution similar to pipx.

SEE ALSO

uv(1), pipx(1), python(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community