-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 run
and uv tool run
should list available scripts and executables
#4024
Comments
@charliermarsh what is the difference between |
Neither is documented right now nor intended to be used -- they're both under active development. But |
|
I actually don't know if we need this, we have |
It probably makes more sense than starting a |
I think |
I think Not sure about |
The |
) ## Summary Part of #4024 ## Test Plan Test cases included.
Gosh, I'd sure love this. The error message here, e.g., when I haven't installed
I think we can at least list things in the virtual environment bin? |
Agreed. Let's start with that. Help wanted! |
Looks like this got implemented as fallback to
At least add a message before like |
Hello team, Can you assign this task to me? |
We're not sure what we we want to do for https://packaging.python.org/en/latest/specifications/entry-points/ uv/crates/uv/src/commands/tool/run.rs Lines 244 to 258 in 4f23491
|
…hen no arguments are provided (#7641) ## Summary Adds a helpful context message when `uvx` is run without arguments To clarify, it is displaying the installed tools. This addresses confusion, such as the one highlighted in issue #7348, by making the output more user-friendly and informative. Related #4024 ## Test Plan Updated the test snapshots to include the new output. Running the tests locally with `cargo nextest run` confirms that the tests pass. The CI pipeline should also pass. ### Manuel Testing **uvx** ```shell # Make sure you have the updated version of uv installed on your path. # cargo install --path ./crates/uv --force ❯ uvx Provide a command to invoke with `uvx <command>` or `uvx --from <package> <command>`. The following tools are already installed: black v24.8.0 - black - blackd ruff v0.6.7 - ruff See `uvx --help` for more information. ``` **uv tool list** ```shell # Make sure you have the updated version of uv installed on your path. # cargo install --path ./crates/uv --force ❯ uv tool list black v24.8.0 - black - blackd ruff v0.6.7 - ruff ``` **uv tool run** ```shell # Make sure you have the updated version of uv installed on your path. # cargo install --path ./crates/uv --force ❯ uv tool run Provide a command to invoke with `uv tool run <command>` or `uv tool run --from <package> <command>`. The following tools are already installed: black v24.8.0 - black - blackd ruff v0.6.7 - ruff See `uv tool run --help` for more information. ``` --- Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> --------- Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> ## Summary This PR adds the ability to list available scripts in the environment when `uv run` is invoked without any arguments. It somewhat mimics the behavior of `rye run` command (See https://rye.astral.sh/guide/commands/run). This is an attempt to fix #4024. ## Test Plan I added test cases. The CI pipeline should pass. ### Manuel Tests ```shell ❯ uv run Provide a command or script to invoke with `uv run <command>` or `uv run script.py`. The following scripts are available: normalizer python python3 python3.12 See `uv run --help` for more information. ``` --------- Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> Co-authored-by: Zanie Blue <contact@zanie.dev>
Rye has this neat feature: https://rye.astral.sh/guide/commands/run/
The text was updated successfully, but these errors were encountered: