Repository: astral-sh/uv
File: crates/uv-cli/src/lib.rs (Rust)

Code before:
        verbatim_doc_comment,
        help_heading = "Python options",
        value_parser = parse_maybe_string,
    )]
    pub python: Option<Maybe<String>>,
}

#[derive(Args)]
pub struct ToolListArgs {
    /// Whether to display the path to each tool environment and installed executable.
    #[arg(long)]
    pub show_paths: bool,

    /// Whether to display the version specifier(s) used to install each tool.
    #[arg(long)]
    pub show_version_specifiers: bool,

    /// Whether to display the additional requirements installed with each tool.
    #[arg(long)]
    pub show_with: bool,

    /// Whether to display the extra requirements installed with each tool.
    #[arg(long)]
    pub show_extras: bool,

    /// Whether to display the Python installation used to run each tool.
    #[arg(long)]
    pub show_python: bool,

    // Hide unused global Python options.
    #[arg(long, hide = true)]
    pub python_preference: Option<PythonPreference>,

    #[arg(long, hide = true)]
    pub no_python_downloads: bool,
}

#[derive(Args)]
pub struct ToolDirArgs {
    /// Show the directory into which `uv tool` will install executables.
    ///
    /// By default, `uv tool dir` shows the directory into which the tool Python environments
    /// themselves are installed, rather than the directory containing the linked executables.
    ///
    /// The tool executable directory is determined according to the XDG standard and is derived
    /// from the following environment variables, in order of preference:
    ///
    /// - `$UV_TOOL_BIN_DIR`
    /// - `$XDG_BIN_HOME`
    /// - `$XDG_DATA_HOME/../bin`
    /// - `$HOME/.local/bin`

Review comment (suggestion):
```suggestion
    /// Whether to display the Python version associated with each tool.
```

Code after:
    /// Packages are installed into an isolated virtual environment in the uv tools directory. The
    /// executables are linked the tool executable directory, which is determined according to the
    /// XDG standard and can be retrieved with `uv tool dir --bin`.
    ///
    /// If the tool was previously installed, the existing tool will generally be replaced.
    Install(ToolInstallArgs),
    /// Upgrade installed tools.
    ///
    /// If a tool was installed with version constraints, they will be respected on upgrade — to
    /// upgrade a tool beyond the originally provided constraints, use `uv tool install` again.
    ///
    /// If a tool was installed with specific settings, they will be respected on upgraded. For
    /// example, if `--prereleases allow` was provided during installation, it will continue to be
    /// respected in upgrades.
    #[command(alias = "update")]
    Upgrade(ToolUpgradeArgs),
    /// List installed tools.
    #[command(alias = "ls")]
    List(ToolListArgs),
    /// Uninstall a tool.
    Uninstall(ToolUninstallArgs),
    /// Ensure that the tool executable directory is on the `PATH`.
    ///
    /// If the tool executable directory is not present on the `PATH`, uv will attempt to add it to
    /// the relevant shell configuration files.
    ///
    /// If the shell configuration files already include a blurb to add the executable directory to
    /// the path, but the directory is not present on the `PATH`, uv will exit with an error.
    ///
    /// The tool executable directory is determined according to the XDG standard and can be
    /// retrieved with `uv tool dir --bin`.
    #[command(alias = "ensurepath")]
    UpdateShell,
    /// Show the path to the uv tools directory.
    ///
    /// The tools directory is used to store environments and metadata for installed tools.
    ///
    /// By default, tools are stored in the uv data directory at `$XDG_DATA_HOME/uv/tools` or
    /// `$HOME/.local/share/uv/tools` on Unix and `%APPDATA%\uv\data\tools` on Windows.
    ///
    /// The tool installation directory may be overridden with `$UV_TOOL_DIR`.
    ///
    /// To instead view the directory uv installs executables into, use the `--bin` flag.
    Dir(ToolDirArgs),
}

#[derive(Args)]
pub struct ToolRunArgs {
    /// The command to run.
    ///
    /// WARNING: The documentation for [`Self::command`] is not included in help output