UV Toolkit is a Visual Studio Code extension that enhances your experience when working with uv, a Python package manager.

📝 Overview
UV Toolkit is an essential tool for Python developers using uv. This extension provides various features such as syntax highlighting, package links, command palette integration, and more to make Python project management easier and more efficient.
⭐ Key Features at a Glance
- Command Palette Integration - Access uv commands directly from VS Code
- Package Management - Easily add, remove, and search for packages
- Dependency Diagnostics - Get warnings for missing dependencies
- Package Links - Click on package names to navigate to PyPI pages
- Syntax Highlighting - Enhanced colors for pyproject.toml and uv.lock files
- Context Menu Integration - Right-click on files to access UV commands
✨ Features
🎮 Command Palette Integration
Access common uv commands directly from the VS Code Command Palette:
Command |
Description |
UV: Initialize Project |
Initialize a new Python project |
UV: Sync Dependencies |
Synchronize dependencies with uv.lock |
UV: Upgrade Packages |
Upgrade all packages |
UV: Clean Cache |
Clean uv cache |
UV: Add Package to Project |
Add a new package to your dependencies |
UV: Remove Package from pyproject.toml |
Remove a package from your dependencies |
UV: Search Package on PyPI |
Search for packages on PyPI and add them to your project |
UV: Generate Lock File |
Generate a uv.lock file from your pyproject.toml |
UV: Upgrade Dependencies |
Upgrade all dependencies or a specific package |
UV: Create Virtual Environment |
Create a new virtual environment |
UV: Run Python Script |
Run a Python script with uv |
UV: Add Script Dependency |
Add inline dependencies to a Python script |
UV: Install Python Version |
Install a specific Python version |
UV: Pin Python Version |
Pin a specific Python version for the project |
UV: Install Tool |
Install a Python tool with uv |
UV: Run Tool with UVX |
Run a Python tool in an ephemeral environment |
📦 Package Management
Easily add, remove, and search for packages with interactive dialogs.
🔍 Dependency Diagnostics
Get warnings when dependencies in your pyproject.toml
are missing from uv.lock
.
🔗 Package Links
Click on package names in uv.lock
and pyproject.toml
files to navigate directly to their PyPI pages. This makes it easy to check package documentation, versions, and other information.
📄 Syntax Highlighting
Enhanced syntax highlighting for pyproject.toml and uv.lock files with custom colors for better readability:
- Section headers are highlighted in bold blue
- Keys are highlighted in light blue
- Values are highlighted based on their type (string, number, boolean)
- Package names are highlighted in teal and bold
- Version numbers are highlighted in yellow
- Comments are highlighted in green and italic
Right-click on pyproject.toml files in the explorer or editor to access UV commands directly from the context menu.
📋 Requirements
IMPORTANT: This extension requires uv to be installed on your system. The extension will not function properly without uv installed and available in your PATH.
- Visual Studio Code 1.70.0 or higher
- uv installed and available in your PATH
💻 Installing uv
You can install uv using one of the following methods:
macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Using pip
pip install uv
Using pipx
pipx install uv
Updating uv
If you've already installed uv, you can update to the latest version with:
uv self update
For more detailed installation instructions, visit the official uv installation documentation.
⚙️ Extension Settings
This extension doesn't have any specific settings.
📖 Usage
Basic Usage
- Open a Python project that uses uv
- Use the Command Palette (
Ctrl+Shift+P
/ Cmd+Shift+P
) and search for "UV" to see available commands
- Click on package names in
uv.lock
and pyproject.toml
to navigate to PyPI
Command Usage
🚀 Project Management
- UV: Initialize Project: Initialize a new Python project. Enter a project name to run the uv init command and create a basic project structure.
📦 Package Management
- UV: Add Package to Project: Add a new package to your project. You can enter the package name, version constraint, and extras.
- UV: Remove Package from pyproject.toml: Remove a package from your pyproject.toml file. You can select which package to remove.
- UV: Search Package on PyPI: Search for packages on PyPI. You can select a package from the search results to add to your project.
- UV: Upgrade Packages: Upgrade all packages to their latest versions.
🔄 Dependency Management
- UV: Sync Dependencies: Synchronize dependencies with uv.lock. You can choose between basic sync, sync from a specific file, or sync specific groups.
- UV: Generate Lock File: Generate a uv.lock file from your pyproject.toml. You can choose between basic compile, include all extras, specify extras, or specify groups.
- UV: Upgrade Dependencies: Upgrade all dependencies or a specific package. You can select which package to upgrade.
🧪 Virtual Environment Management
- UV: Create Virtual Environment: Create a new virtual environment. You can choose between creating a basic venv or creating a venv with a specific Python version.
▶️ Python Script Execution
- UV: Run Python Script: Run a Python script with uv. You can select which script to run and optionally specify a Python version.
- UV: Add Script Dependency: Add inline dependencies to a Python script. You can select a script and a package to add.
🐍 Python Version Management
- UV: Install Python Version: Install a specific Python version. You can enter which Python version to install.
- UV: Pin Python Version: Pin a specific Python version for the project. You can enter which Python version to pin.
🛠️ Tool Management
- UV: Install Tool: Install a Python tool with uv. You can enter the name of the tool to install.
- UV: Run Tool with UVX: Run a Python tool in an ephemeral environment. You can enter the name of the tool to run and optionally enter tool arguments.
🧹 Miscellaneous
- UV: Clean Cache: Clean the uv cache.
💡 Feedback & Contributions
We welcome feedback and contributions to improve this extension! Feel free to report issues or suggest improvements on our GitHub repository.