uv icon indicating copy to clipboard operation
uv copied to clipboard

[feature request] uv toolchain list shows the "type" of toolchain

Open baggiponte opened this issue 1 year ago • 1 comments

When I run uv toolchain list I get this output:

cpython-3.12.4-macos-aarch64-none       /opt/homebrew/opt/[email protected]/bin/python3.12
cpython-3.12.3-macos-aarch64-none       /Users/luca/Library/Application Support/uv/toolchains/cpython-3.12.3-macos-aarch64-none/install/bin/python3
cpython-3.11.9-macos-aarch64-none       /Users/luca/Library/Application Support/uv/toolchains/cpython-3.11.9-macos-aarch64-none/install/bin/python3
cpython-3.10.14-macos-aarch64-none      /Users/luca/Library/Application Support/uv/toolchains/cpython-3.10.14-macos-aarch64-none/install/bin/python3
cpython-3.9.19-macos-aarch64-none       /Users/luca/Library/Application Support/uv/toolchains/cpython-3.9.19-macos-aarch64-none/install/bin/python3
cpython-3.9.6-macos-aarch64-none        /Library/Developer/CommandLineTools/usr/bin/python3
cpython-3.8.19-macos-aarch64-none       /Users/luca/Library/Application Support/uv/toolchains/cpython-3.8.19-macos-aarch64-none/install/bin/python3

Maybe it would be nice to differentiate them by colour/add another colour to denote whether a toolchain is system/uv or something else. Might have a usecase for piping shell commands and other stuff.

baggiponte avatar Jul 03 '24 07:07 baggiponte

If it's going to be processed downstream I think a JSON output format makes more sense than complicating the output. I'm pretty hesitant to add more columns to the table. I'd be curious to see an approach with colors.

As a note, you can also filter by the path starting with uv toolchain dir or get a subset of the toolchains with the --toolchain-preference option, e.g., uv toolchain list --toolchain-preference only-managed --only-installed

zanieb avatar Jul 03 '24 13:07 zanieb