Skip to main content

Detect how uv was installed and get upgrade instructions

Project description

uvhow

Detect how uv was installed and get upgrade instructions.

Works on Windows, macOS, and Linux with support for all major installation methods.

Usage

Run with uvx (recommended):

uvx uvhow

Or install and run:

uv add uvhow
uvhow

Example Output

🔍 uv installation detected

✅ Found uv: uv 0.8.0 (0b2357294 2025-07-17)
📍 Location: /Users/user/.local/bin/uv

🎯 Installation method: Standalone installer
💡 To upgrade: uv self update

Supported Installation Methods

Unix/Linux/macOS

  • Standalone installer (~/.local/bin/uv) -> uv self update
  • Cargo (~/.cargo/bin/uv) -> cargo install --git https://github.com/astral-sh/uv uv --force
  • Homebrew (/opt/homebrew/bin/uv) -> brew upgrade uv
  • pipx (~/.local/share/pipx/venvs/uv/bin/uv) -> pipx upgrade uv
  • pip (virtual environment) -> pip install --upgrade uv
  • pip (system) -> sudo pip install --upgrade uv
  • pip (user) -> pip install --upgrade --user uv

Windows

  • Standalone installer (%USERPROFILE%\AppData\Local\Programs\uv\uv.exe) -> uv self update
  • Cargo (%USERPROFILE%\.cargo\bin\uv.exe) -> cargo install --git https://github.com/astral-sh/uv uv --force
  • Scoop (%USERPROFILE%\scoop\apps\uv\current\uv.exe) -> scoop update uv
  • Chocolatey (C:\ProgramData\chocolatey\bin\uv.exe) -> choco upgrade uv
  • pipx (%USERPROFILE%\pipx\venvs\uv\Scripts\uv.exe) -> pipx upgrade uv
  • pip (virtual environment) -> pip install --upgrade uv
  • pip (system) -> pip install --upgrade uv
  • pip (user) -> pip install --upgrade --user uv
  • pip (Windows Store Python) -> pip install --upgrade uv

Programmatic Usage

from uvhow import detect_uv_installation

installation = detect_uv_installation()
if installation:
    print(f"Method: {installation.method}")
    print(f"Upgrade: {installation.upgrade_command}")

Development

Setup

Install pre-commit hooks for code quality:

pip install pre-commit
pre-commit install

This will automatically:

  • Remove trailing whitespace
  • Fix end-of-file issues
  • Format Python code with Black
  • Sort imports with isort
  • Validate YAML/TOML syntax
  • Check for merge conflicts

Releasing New Versions

Use the included version bump script to release new versions:

# Preview what will happen
python bump_version.py patch --dry-run

# Bump patch version (0.1.2 -> 0.1.3) and deploy
python bump_version.py patch

# Bump minor version (0.1.2 -> 0.2.0) and deploy
python bump_version.py minor

# Bump major version (0.1.2 -> 1.0.0) and deploy
python bump_version.py major

The script will:

  1. Update the version in pyproject.toml
  2. Commit the version change
  3. Create a git tag (e.g., v0.1.3)
  4. Push the tag to trigger GitHub Actions deployment to PyPI

Requirements:

  • Clean git working directory (no uncommitted changes)
  • Push access to the repository

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uvhow-0.4.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uvhow-0.4.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file uvhow-0.4.1.tar.gz.

File metadata

  • Download URL: uvhow-0.4.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for uvhow-0.4.1.tar.gz
Algorithm Hash digest
SHA256 2dd8b957b4e97c4bffe1b6e4eca7d219653e6f49b92ee5a0e82c570683cf8585
MD5 f1ae8cf0a71f1201a0af128ff9a26e48
BLAKE2b-256 663a77c9f57500df8eae2b46a1bf5075eb48dfdb73b65a06a48f9add8f6feb70

See more details on using hashes here.

Provenance

The following attestation bundles were made for uvhow-0.4.1.tar.gz:

Publisher: publish.yml on python-developer-tooling-handbook/uvhow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uvhow-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: uvhow-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for uvhow-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 37e08cc89834ecbd1e6a9f5d8009982e4f867511d340062be0cd08af59471a95
MD5 46071ecf725c82846b3ebb47edb8bdb2
BLAKE2b-256 7bf5f845cebf741138d5f99f3ab0fa2c303eaed4b87407ec48030dd5a005507f

See more details on using hashes here.

Provenance

The following attestation bundles were made for uvhow-0.4.1-py3-none-any.whl:

Publisher: publish.yml on python-developer-tooling-handbook/uvhow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page