uv icon indicating copy to clipboard operation
uv copied to clipboard

`uv tool list` might have a `--plain` flag to only list names?

Open baggiponte opened this issue 1 year ago • 6 comments

This might be a request of a solution for the wrong problem. Since I cannot install (or upgrade) multiple tools with uv tool, I thought of using a bit of a hack:

for tool in $(uv tool list); do
    uv tool uninstall $tool && uv tool install $tool
done

However, uv tool list doesn't simply print all tools, but also their entrypoints. Maybe a --plain or --tools-only or --no-entrypoints flag might do?

I remember opening a similar feature request for rye to accept multiple packages at once, but Armin correctly pointed out the executable would not be able to handle the options/flags.

baggiponte avatar Jul 18 '24 12:07 baggiponte

We're intending to address bulk operations some other way e.g. uv tool upgrade --all.

I wouldn't mind adding a --no-show-executables flag though; similar to how we just added a --show-paths flag in #5164

zanieb avatar Jul 18 '24 14:07 zanieb

Note I think you can also do uv tool install <name> --upgrade and skip the uninstall?

zanieb avatar Jul 18 '24 14:07 zanieb

Note I think you can also do uv tool install <name> --upgrade and skip the uninstall?

Totally forgot about that. Thanks 😬

Feel free to close the issue whenever you want! And thanks again.

baggiponte avatar Jul 19 '24 07:07 baggiponte

I still think tool list --plain or similar would need to include versions though.

charliermarsh avatar Jul 19 '24 13:07 charliermarsh

Yeah idk, --no-show-executables and --no-show-versions?. Eventually it just makes sense to create a JSON output format.

zanieb avatar Jul 19 '24 13:07 zanieb

For comparison, pipx list has --short to show only packages and versions without the entrypoints, and --json for json output.

saaketp avatar Aug 12 '24 16:08 saaketp