Using YT-DLP With UVX

Introduction YT‑DLP is a fast, actively maintained command-line tool for downloading audio and video from many sites. I use it to extract audio from videos for offline listening on walks. This post shows a simple, reproducible workflow using UV/UVX so you can run YT‑DLP without installing it system‑wide, plus a small PowerShell helper script to make converting downloads easier. What you’ll find here: Prerequisites and quick troubleshooting tips How I run YT‑DLP via UVX A ready-to-use PowerShell script Legal/Terms reminder: only download content you have the right to store or that is permitted by the content provider’s terms of service. ...

October 12, 2025 · Jonathan B

Modernizing Python Development: My Switch to UV

Summary of Common UV Commands # Install UV - multiple options available ###################################################### # Windows powershell -ExecutionPolicy ByPass -c "irm <https://astral.sh/uv/install.ps1> | iex" winget install --id=astral-sh.uv -e # Linux/macOS curl -LsSf "https://astral.sh/uv/install.sh" | less brew install uv # Python pipx install uv # alternative is pip uv --version # or 'uv self version' uv --help # --help can be used with all commands uv self update # Update UV itself # Install and Manage Python ###################################################### uv python install # Install latest Python version uv python install 3.10.5 # Install specific Python version uv python install --default # Add python.exe to $HOME\.local\bin\ uv python install --reinstall # Reinstall uv-managed Python versions uv python list # List available Python versions uv python list --managed-python # Only list managed Python versions uv python list --no-managed-python # Only list system Python versions uv python upgrade 3.14 # Install the latest patch version uv python uninstall 3.10.5 # Uninstall version uv python find 3.14 # Show path for a specific python.exe uv run where <exe_name> # Show path(s) of all <exe_name>.exe uv python pin 3.14 # Use a specific version in the _current directory_ # Creates a .python-version file # UV Uninstall uv cache clean # Optional, but recommended rm -r "$(uv python dir)" # Optional, but recommended rm -r "$(uv tool dir)" # Optional, but recommended rm $HOME\.local\bin\uv*.exe # Windows rm ~/.local/bin/uv ~/.local/bin/uvx # Linux/macOS # Run Python ###################################################### uv run python # REPL with default version uv run <script>.py # Default version uv run -p 3.14 <script>.py # Specific version, --python alias uv run python [py_option] # Standard Python cmd options uv run --with <pkg> <script>.py # Include dependency package # Multiple --with allowed # Can use UVX, but take care when trying to run pytest, mypy, etc uvx python@3.14 <script>.py # Specific version # Create Virtual Environment (Venv) ###################################################### uv venv # Use the default Python version uv venv <venv_name> # Specify the Venv name uv venv --python 3.14 # Specify the Python version for the Venv uv venv --seed # Add the PiP module to the Venv # Activate Venus .venv\Scripts\activate # PowerShell source .venv/bin/activate # Linux/macOS deactivate # Add Dependencies - normally into current venv ###################################################### uv add <pkg1,...> # Add one or more dependencies to the project # Version Specifiers allowed, e.g. rich>13.9.1 uv add -r requirements.txt # Add all in the given `requirements.txt` uv remove <pkg1,...> # Remove dependencies from the project # Requires 'pyproject.toml' uv tree # View the dependency tree uv tree --outdated --depth 1 # View latest available versions uv sync # Sync environment from uv.lock uv lock # Create uv.lock (happens automatically anyway) uv sync ---upgrade # Edit pyproject.toml to change package version, then... # 'pyproject.toml' [dependency-groups] uv add --dev <pkg1,...> # Add to the development group uv add --group test <testpkg> # Add to user named `test` group uv add <azurepkg> --optional azure # Add Optional to 'azure' group # Remove is the same ordering, # e.g. "uv remove --dev tox coverage" # Manage Python packages with a pip-compatible interface ###################################################### uv pip list # List packages installed uv pip install <pkg1 pkg2..> # Install package into an environment uv pip install -p 3.14 <pkg> # Install into specific version # Install packages into the system Python environment (non-virtual) uv pip install --system <pkg> # Allow UV to modify an `EXTERNALLY-MANAGED` Python installation uv pip install --system --break-system-packages <pkg> # Create UV Project Areas ###################################################### uv init # Create in CWD, default proj type = --app uv init <proj_name> # Create a default named project uv init --bare # Only create a pyproject.toml uv init --app # Application project - this is the default uv init --package # Package project uv init --lib # Library project uv version # _Project_ version, as listed in the pyproject.toml # Build Project ###################################################### uv build # Build Lib/Pkg using UV or specified Build-Backend # UV Tools ###################################################### # Run Tools uvx <tool> # UVX is an alias for 'uv tool run' uvx <tool@version> # Specify Tool Version: <tool@version> uvx <tool>@latest # Latest Tool Version uv cache clean # Deletes all entries in the cache # Install Tools uv tool install <tool> # [install | uninstall | upgrade] uv tool install <tool>@latest # Install latest version of <tool> uv tool update-shell # Ensure Tool Exe on path (if not already) # Tool Info uv tool dir # Installed source uv tool dir --bin # Installed executable uv tool list # List Installed Tools Introduction Python development is evolving rapidly, and UV is at the forefront of this transformation. In this post, I wanted to document my experience switching to UV, why and I how I’ve started the move to a modern workflow. ...

July 27, 2025 · Jonathan B