Skip to content

Handle missing uv gracefully #24

@CybotTM

Description

@CybotTM

Problem

When uv (the Python package manager) is not installed, scripts that depend on it fail without a helpful error message. The agent or user sees cryptic errors instead of clear guidance on how to install uv.

Expected Behavior

When uv is missing:

  1. Detect that uv is not available
  2. Show a clear error message explaining uv is required
  3. Provide installation instructions for common platforms:
    # macOS/Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
    # Windows
    powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
    
    # Or via pip
    pip install uv

Current Behavior

Scripts fail with errors like:

  • command not found: uv
  • Or the script proceeds and fails later with confusing errors

Suggested Solution

Add a check at the start of scripts or in the toolset initialization:

if ! command -v uv &> /dev/null; then
    echo "Error: uv is required but not installed."
    echo ""
    echo "Install uv:"
    echo "  curl -LsSf https://astral.sh/uv/install.sh | sh"
    echo ""
    echo "See: https://docs.astral.sh/uv/"
    exit 1
fi

Or handle it in the CLI toolset's dependency checking mechanism.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions