pub struct RunArgs {Show 41 fields
pub extra: Option<Vec<ExtraName>>,
pub all_extras: bool,
pub no_extra: Vec<ExtraName>,
pub no_all_extras: bool,
pub dev: bool,
pub no_dev: bool,
pub group: Vec<GroupName>,
pub no_group: Vec<GroupName>,
pub no_default_groups: bool,
pub only_group: Vec<GroupName>,
pub all_groups: bool,
pub module: bool,
pub only_dev: bool,
pub editable: bool,
pub no_editable: bool,
pub inexact: bool,
pub exact: bool,
pub env_file: Vec<String>,
pub no_env_file: bool,
pub command: Option<ExternalCommand>,
pub with: Vec<CommaSeparatedRequirements>,
pub with_editable: Vec<CommaSeparatedRequirements>,
pub with_requirements: Vec<Maybe<PathBuf>>,
pub isolated: bool,
pub active: bool,
pub no_active: bool,
pub no_sync: bool,
pub locked: bool,
pub frozen: bool,
pub script: bool,
pub gui_script: bool,
pub installer: ResolverInstallerArgs,
pub build: BuildOptionsArgs,
pub refresh: RefreshArgs,
pub all_packages: bool,
pub package: Option<PackageName>,
pub no_project: bool,
pub python: Option<Maybe<String>>,
pub show_resolution: bool,
pub max_recursion_depth: Option<u32>,
pub python_platform: Option<TargetTriple>,
}Fields§
§extra: Option<Vec<ExtraName>>Include optional dependencies from the specified extra name.
May be provided more than once.
Optional dependencies are defined via project.optional-dependencies in a pyproject.toml.
This option is only available when running in a project.
all_extras: boolInclude all optional dependencies.
Optional dependencies are defined via project.optional-dependencies in a pyproject.toml.
This option is only available when running in a project.
no_extra: Vec<ExtraName>Exclude the specified optional dependencies, if --all-extras is supplied.
May be provided multiple times.
no_all_extras: bool§dev: boolInclude the development dependency group.
Development dependencies are defined via dependency-groups.dev or
tool.uv.dev-dependencies in a pyproject.toml.
This option is an alias for --group dev.
This option is only available when running in a project.
no_dev: boolDisable the development dependency group.
This option is an alias of --no-group dev.
See --no-default-groups to disable all default groups instead.
This option is only available when running in a project.
group: Vec<GroupName>Include dependencies from the specified dependency group.
May be provided multiple times.
no_group: Vec<GroupName>Disable the specified dependency group.
This option always takes precedence over default groups,
--all-groups, and --group.
May be provided multiple times.
no_default_groups: boolIgnore the default dependency groups.
uv includes the groups defined in tool.uv.default-groups by default.
This disables that option, however, specific groups can still be included with --group.
only_group: Vec<GroupName>Only include dependencies from the specified dependency group.
The project and its dependencies will be omitted.
May be provided multiple times. Implies --no-default-groups.
all_groups: boolInclude dependencies from all dependency groups.
--no-group can be used to exclude specific groups.
module: boolRun a Python module.
Equivalent to python -m <module>.
only_dev: boolOnly include the development dependency group.
The project and its dependencies will be omitted.
This option is an alias for --only-group dev. Implies --no-default-groups.
editable: boolInstall any non-editable dependencies, including the project and any workspace members, as editable.
no_editable: boolInstall any editable dependencies, including the project and any workspace members, as non-editable.
inexact: boolDo not remove extraneous packages present in the environment.
exact: boolPerform an exact sync, removing extraneous packages.
When enabled, uv will remove any extraneous packages from the environment. By default, uv run will make the minimum necessary changes to satisfy the requirements.
env_file: Vec<String>Load environment variables from a .env file.
Can be provided multiple times, with subsequent files overriding values defined in previous files.
no_env_file: boolAvoid reading environment variables from a .env file.
command: Option<ExternalCommand>The command to run.
If the path to a Python script (i.e., ending in .py), it will be
executed with the Python interpreter.
with: Vec<CommaSeparatedRequirements>Run with the given packages installed.
When used in a project, these dependencies will be layered on top of the project environment in a separate, ephemeral environment. These dependencies are allowed to conflict with those specified by the project.
with_editable: Vec<CommaSeparatedRequirements>Run with the given packages installed in editable mode.
When used in a project, these dependencies will be layered on top of the project environment in a separate, ephemeral environment. These dependencies are allowed to conflict with those specified by the project.
with_requirements: Vec<Maybe<PathBuf>>Run with the packages listed in the given files.
The following formats are supported: requirements.txt, .py files with inline metadata,
and pylock.toml.
The same environment semantics as --with apply.
Using pyproject.toml, setup.py, or setup.cfg files is not allowed.
isolated: boolRun the command in an isolated virtual environment.
Usually, the project environment is reused for performance. This option forces a fresh environment to be used for the project, enforcing strict isolation between dependencies and declaration of requirements.
An editable installation is still used for the project.
When used with --with or --with-requirements, the additional dependencies will still be
layered in a second environment.
active: boolPrefer the active virtual environment over the project’s virtual environment.
If the project virtual environment is active or no virtual environment is active, this has no effect.
no_active: boolPrefer project’s virtual environment over an active environment.
This is the default behavior.
no_sync: boolAvoid syncing the virtual environment.
Implies --frozen, as the project dependencies will be ignored (i.e., the lockfile will not
be updated, since the environment will not be synced regardless).
locked: boolAssert that the uv.lock will remain unchanged.
Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.
frozen: boolRun without updating the uv.lock file.
Instead of checking if the lockfile is up-to-date, uses the versions in the lockfile as the
source of truth. If the lockfile is missing, uv will exit with an error. If the
pyproject.toml includes changes to dependencies that have not been included in the
lockfile yet, they will not be present in the environment.
script: boolRun the given path as a Python script.
Using --script will attempt to parse the path as a PEP 723 script,
irrespective of its extension.
gui_script: boolRun the given path as a Python GUI script.
Using --gui-script will attempt to parse the path as a PEP 723 script and run it with
pythonw.exe, irrespective of its extension. Only available on Windows.
installer: ResolverInstallerArgs§build: BuildOptionsArgs§refresh: RefreshArgs§all_packages: boolRun the command with all workspace members installed.
The workspace’s environment (.venv) is updated to include all workspace members.
Any extras or groups specified via --extra, --group, or related options will be applied
to all workspace members.
package: Option<PackageName>Run the command in a specific package in the workspace.
If the workspace member does not exist, uv will exit with an error.
no_project: boolAvoid discovering the project or workspace.
Instead of searching for projects in the current directory and parent directories, run in an
isolated, ephemeral environment populated by the --with requirements.
If a virtual environment is active or found in a current or parent directory, it will be used as if there was no project or workspace.
python: Option<Maybe<String>>The Python interpreter to use for the run environment.
If the interpreter request is satisfied by a discovered environment, the environment will be used.
See uv help python to view supported request formats.
show_resolution: boolWhether to show resolver and installer output from any environment modifications.
By default, environment modifications are omitted, but enabled under --verbose.
max_recursion_depth: Option<u32>Number of times that uv run will allow recursive invocations.
The current recursion depth is tracked by environment variable. If environment variables are cleared, uv will fail to detect the recursion depth.
If uv reaches the maximum recursion depth, it will exit with an error.
python_platform: Option<TargetTriple>The platform for which requirements should be installed.
Represented as a “target triple”, a string that describes the target platform in terms of
its CPU, vendor, and operating system name, like x86_64-unknown-linux-gnu or
aarch64-apple-darwin.
When targeting macOS (Darwin), the default minimum version is 13.0. Use
MACOSX_DEPLOYMENT_TARGET to specify a different minimum version, e.g., 14.0.
When targeting iOS, the default minimum version is 13.0. Use
IPHONEOS_DEPLOYMENT_TARGET to specify a different minimum version, e.g., 14.0.
When targeting Android, the default minimum Android API level is 24. Use
ANDROID_API_LEVEL to specify a different minimum version, e.g., 26.
WARNING: When specified, uv will select wheels that are compatible with the target
platform; as a result, the installed distributions may not be compatible with the current
platform. Conversely, any distributions that are built from source may be incompatible with
the target platform, as they will be built for the current platform. The
--python-platform option is intended for advanced use cases.
Trait Implementations§
Source§impl Args for RunArgs
impl Args for RunArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for RunArgs
impl FromArgMatches for RunArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Auto Trait Implementations§
impl Freeze for RunArgs
impl RefUnwindSafe for RunArgs
impl Send for RunArgs
impl Sync for RunArgs
impl Unpin for RunArgs
impl UnwindSafe for RunArgs
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more