Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv tool list -v should show paths #4823

Closed
konstin opened this issue Jul 5, 2024 · 8 comments · Fixed by #5164
Closed

uv tool list -v should show paths #4823

konstin opened this issue Jul 5, 2024 · 8 comments · Fixed by #5164
Assignees
Labels
enhancement New feature or request preview Experimental behavior

Comments

@konstin
Copy link
Member

konstin commented Jul 5, 2024

It would be great if uv tool list would have a verbose mode that shows paths, maybe reusing -v, maybe something like --paths.

Current output:

$ cargo run -q tool list -v --preview
DEBUG uv 0.2.21
DEBUG Acquired lock for `/home/konsti/.local/share/uv/tools`
warning: Ignoring malformed tool `interpreter-v2`: missing receipt
Python interpreter not found at `/home/konsti/.local/share/uv/tools/azure-cli/bin/python3`
black v24.4.2
    black
    blackd

Desired output

$ cargo run -q tool list -v --preview
DEBUG uv 0.2.21
DEBUG Acquired lock for `/home/konsti/.local/share/uv/tools`
warning: Ignoring malformed tool `interpreter-v2`: missing receipt
Python interpreter not found at `/home/konsti/.local/share/uv/tools/azure-cli/bin/python3`
black v24.4.2 (/home/konsti/.local/share/uv/tools/black/)
    black (/home/konsti/.local/bin/black)
    blackd (/home/konsti/.local/bin/blackd)
@konstin konstin added enhancement New feature or request preview Experimental behavior labels Jul 5, 2024
@zanieb
Copy link
Member

zanieb commented Jul 5, 2024

Seems kind of nice, but won't the paths be mostly redundant since they're all going to be in the same bin directory?

@konstin
Copy link
Member Author

konstin commented Jul 5, 2024

If we just show the data and the bin directory that's fine too

@charliermarsh
Copy link
Member

uv tool dir shows the directory into which we install the tools. But it should probably show the bin directory...?

@zanieb
Copy link
Member

zanieb commented Jul 8, 2024

That might make more sense although we're calling the install directory the "uv tool directory" whereas the bin directory is the "tool executable directory". Maybe we need a toggle? Maybe we should have two commands with clearer names?

@charliermarsh
Copy link
Member

Any further thoughts here? I would be ok showing the paths with -v but it feels "surprising".

@zanieb
Copy link
Member

zanieb commented Jul 17, 2024

I think uv tool dir should have a --bin flag that shows the binary directory instead?

Regarding paths of tools, Cargo doesn't show them

❯ cargo install --list -v
cargo-dist v0.17.0:
    cargo-dist
cargo-insta v1.38.0:
    cargo-insta
cargo-nextest v0.9.72:
    cargo-nextest
cargo-shear v0.0.26:
    cargo-shear
hyperfine v1.18.0:
    hyperfine
mdbook v0.4.40:
    mdbook
ripgrep v14.1.0:
    rg
typos-cli v1.22.4:
    typos

I'd be okay with showing the paths with -v or a --show-paths flag. In this case, I'd think we'd show the paths for both the executables and the environment e.g.

typos-cli v1.22.4 (/Users/zb/.local/tools/typos-cli):
    typos (/Users/zb/.local/bin/typos)

@charliermarsh
Copy link
Member

Okay, I'm fine with --bin and --show-paths.

@charliermarsh
Copy link
Member

I can do them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request preview Experimental behavior
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants