uv icon indicating copy to clipboard operation
uv copied to clipboard

"uv tool list" to highlight tools installed in editable mode

Open afaucon opened this issue 1 year ago • 4 comments

Dear uv community and core team,

Congratulation for your job.

This is a question for a feature as I did not find any info in the documentation neither in existing issues. I installed a tool in editable mode with uv tool install -e . To list the installed tools: uv tool list. But in the list of installed tools, how can I know which one have been installed in editable mode, and where are the source coe location?

BR, Adrien

afaucon avatar Dec 02 '24 11:12 afaucon

Ah yeah, this isn't displayed today. We could consider showing it.

charliermarsh avatar Dec 02 '24 13:12 charliermarsh

Thinking about this interface..

❯ uv tool list
rooster-blue v0.0.0
- rooster

could become

❯ uv tool list
rooster-blue v0.0.0 (from /Users/zb/workspace/rooster)
- rooster

for local sources? Perhaps we'd want a dedicated message for editable installs?

❯ uv tool list
rooster-blue v0.0.0 (editable from /Users/zb/workspace/rooster)
- rooster

There's a slight conflict with --show-paths:

❯ uv tool list --show-paths
rooster-blue v0.0.0 (/Users/zb/.local/share/uv/tools/rooster-blue)
- rooster (/Users/zb/.local/bin/rooster)

It seems ok to duplicate the parenthesis since it's not a common display format.

❯ uv tool list --show-paths
rooster-blue v0.0.0 (editable from /Users/zb/workspace/rooster) (/Users/zb/.local/share/uv/tools/rooster-blue)
- rooster (/Users/zb/.local/bin/rooster)

zanieb avatar Dec 02 '24 15:12 zanieb

While working on #9636, the uv tool list is generating more and more information, making it difficult to fit everything on one line. I am considering changing the format to something like this:

❯ uv tool list --show-paths --show-version-specifiers --outdated
rooster-blue v0.0.0
  latest:      v0.0.1
  required:    <1
  editable:    /Users/zb/workspace/rooster
  path:        /Users/zb/.local/share/uv/tools/rooster-blue
  entrypoints:
    - rooster (/Users/zb/.local/bin/rooster)

j178 avatar Dec 04 '24 12:12 j178

Hm. It's hard to say if we should be optimizing for the "show everything" use-case. That seems like a better fit for uv tool list --output-format json. Like, why would you need --show-paths with --outdated?

zanieb avatar Dec 04 '24 16:12 zanieb