Quickstart
When working on a Python project, we often modify the dependency list by adding, removing, or updating packages, which usually requires temporarily switching to a terminal to run the appropriate commands.
uv add requestsIf you want to add a dependency for a specific Python script, you also need to include the --script option, like this:
uv add --script script.py requestsThe extension adds small buttons directly above the dependencies section in a file, allowing you to add, remove, or update dependencies without switching to a terminal.


These same buttons also work for Python scripts with inline metadata, so you don’t need to use the terminal with the --script flag.
Add, Remove, and Update
When you press the add or remove dependency button, the extension will ask what you want to add or remove. The input you provide is then passed as an argument to the uv add or uv remove command.


The extension then executes a uv command like this:
uv add requestsuv add --script {{SCRIPT_PATH}} requestsNote that it might be slightly more complicated due to additional options set by the extension.
Passing extra options
You can also include extra options, which will be passed to uv as well.
For example, an input like . --editable would be translated to
uv add . --editable