uv icon indicating copy to clipboard operation
uv copied to clipboard

`uv tool run` could be more helpful when a package name and tool don't match

Open akx opened this issue 1 year ago • 1 comments

macOS arm64, uv 0.4.24

$ uv tool run cyclonedx-bom
The executable `cyclonedx-bom` was not found.
warning: An executable named `cyclonedx-bom` is not provided by package `cyclonedx-bom`.
The following executables are provided by `cyclonedx-bom`:
- cyclonedx-py

Suggestions:

  • This help text could tell me what to do to make this work (the magic spell uv tool run --from cyclonedx-bom cyclonedx-py).

    • uv tool run cyclonedx-py --from cyclonedx-bom already has this sort of warning in place: warning: An executable named cyclonedx-pyis not provided by packagecyclonedx-pybut is available via the dependencycyclonedx-bom. Consider using uv tool run --from cyclonedx-bom cyclonedx-py instead.
  • Alternatively, this could Do What I Mean and at least prompt me if I want to run the similarly-named single option, if not run it directly?

akx avatar Oct 18 '24 06:10 akx

I like adding the uv tool run --from cyclonedx-bom cyclonedx-py hint at the end.

charliermarsh avatar Oct 18 '24 17:10 charliermarsh