uv icon indicating copy to clipboard operation
uv copied to clipboard

Show tool entry points in `uv tool list`

Open zanieb opened this issue 1 year ago • 5 comments

We should display the name of the executable entry points that are provided by an installed tool e.g.

$ uv tool list
black
    black
    blackd

The format is up for debate, open questions include things like:

  • Should we show the path to the executable?
  • Should this be opt-in or display by default?
  • Should we omit it for tools that provide a single entry points with the same name?

Another idea is like

$ uv tool list
black (provides: black, blackd)

When proposing a design here, we should take into account the output of other tools like pipx.

Related:

  • #4653

zanieb avatar Jun 29 '24 22:06 zanieb

The proposal to match cargo install --list in https://github.com/astral-sh/uv/issues/4653#issuecomment-2198488484 seems nice.

zanieb avatar Jun 30 '24 14:06 zanieb

Hello I would like to have a look and help on this; but I am relatively new to uv and rust so it will not be immediate, if this is urgent I will just collaborate and have a look at the proposed solution to learn about the codebase and be useful someday else :) Anyway uv is amazing thanks to te dev team !

moreaupascal56 avatar Jun 30 '24 15:06 moreaupascal56

Thanks @moreaupascal56! Appreciate it :)

It's likely someone will tackle this soon (or I will) but feel free to ask questions on the pull request. We'll be tagging more things as https://github.com/astral-sh/uv/labels/good%20first%20issue so keep an eye out.

zanieb avatar Jun 30 '24 15:06 zanieb

The proposal to match cargo install --list in #4653 (comment) seems nice.

I like it, another possible design could be uv tool list show entrypoints instead of installed tools:

$ uv tool list
black
blackd (from black)

By that, no indentions applied to output and user will know what names are available to use. A benefit from this design is that when entrypoints of a tool don't have self contained:

tool-name = test-cli
entrypoints = tester, testing

with this design it'd be:

$ uv tool list
tester (from test-cli)
testing (from test-cli)

with indentions:

$ uv tool list
test-cli
    tester
    testing

first one prioritizes entrypoints visually, and more looks good into my eyes.

T-256 avatar Jun 30 '24 17:06 T-256

I kind of like that, but it gets a little tricky with versions.

Nit: If you've used uv tool install you shouldn't use uv tool run, they're added to your path and invoked directly. To run blackd with uv tool run you'd need uv tool run --from black blackd.

zanieb avatar Jun 30 '24 22:06 zanieb