astral-sh/uv · error · anyhow::Error

No tool command provided

Error message

No tool command provided

What it means

Error "No tool command provided" thrown in astral-sh/uv.

Source

Thrown at crates/uv/src/commands/tool/run.rs:153

        );
    }

    let env_file_environment = if no_env_file {
        Vec::new()
    } else {
        read_env_files(env_file.iter())?
    };

    let Some(command) = command else {
        // When a command isn't provided, we'll show a brief help including available tools
        show_help(invocation_source, &cache, printer).await?;
        // Exit as Clap would after displaying help
        return Ok(ExitStatus::Error);
    };

    let (target, args) = command.split();
    let Some(target) = target else {
        return Err(anyhow::anyhow!("No tool command provided"));
    };

    let Some(target) = target.to_str() else {
        return Err(anyhow::anyhow!(
            "Tool command could not be parsed as UTF-8 string. Use `--from` to specify the package name"
        ));
    };

    if let Some(ref from) = from {
        if has_python_script_ext(Path::new(from)) {
            let package_name = PackageName::from_str(from)?;
            return Err(ToolRunScriptError::FromScript {
                package_name,
                target: target.to_string(),
                invocation: invocation_source,
            }
            .into());
        }

View on GitHub (pinned to f1a42680ff)

When it happens

Trigger: Thrown at crates/uv/src/commands/tool/run.rs:153 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of astral-sh/uv@f1a42680ff (2026-08-16). Data as JSON: /api/errors/0d1c5bdd9bd5f503. Report an issue: GitHub.