astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
21.63k stars 631 forks source link

Show tool versions in `uv tool list` #4653

Closed zanieb closed 3 months ago

zanieb commented 3 months ago

In addition to the name, it'd be nice to show the installed version. Should this be behind a flag? Are there other commands like uv pip list or pipx list we should take inspiration from?

A simple example:

$ uv tool list --show-versions
black v20.0.1

Related:

blueraft commented 3 months ago

The cargo command which includes both the version and entrypoints could be used as an inspiration too.

❯ cargo install --list
sqlx-cli v0.7.3:
    cargo-sqlx
    sqlx
zanieb commented 3 months ago

Nice, I like the look of that

caiquejjx commented 3 months ago

I think the version should be showed by default because it doesn't add that much of information, the entrypoints maybe we should add a flag like --entrypoints because for cases where we have a lot of tools it might be too much

charliermarsh commented 3 months ago

Personally I'd probably do:

sqlx-cli==0.7.3:
    cargo-sqlx
    sqlx

Only because sqlx-cli==0.7.3 matches pip freeze. But I don't feel strongly.

zanieb commented 3 months ago

I don't love the pinned requirement syntax for something that will always be a specific version and isn't meant for consumption by another tool.

caiquejjx commented 3 months ago

I have created a pr based on @blueraft suggestion, lmk if it is the final design we want