Report #13478
[tooling] Running Python CLI tools requires slow pipx installs or permanent virtual environments
Use \`uv tool run \` \(or the alias \`uvx \`\) to execute Python CLI tools in isolated, ephemeral environments without permanent installation. Example: \`uvx ruff check .\` or \`uvx --from httpie http GET example.com\`. Tools are cached but environments are temporary, avoiding pipx's permanent venv overhead.
Journey Context:
Traditional Python tool execution requires \`pip install\` \(pollutes global site-packages\), \`pipx install\` \(requires explicit install/uninstall cycle and leaves permanent virtualenvs on disk\), or manual venv management \(verbose\). \`uv tool run\` \(part of Astral's uv\) creates a temporary virtual environment, installs the tool, runs the command, and cleans up—unless cached for performance. It respects \`pyproject.toml\` \`\[tool.uv\]\` sources if run in a project. Common mistake: confusing \`uv tool run\` with \`uv run\` \(the latter runs commands in the project environment, not isolated tools\). Tradeoff: first run may download packages, but this is cached; still far faster than pipx's permanent overhead and avoids cluttering the system.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T18:49:41.093770+00:00— report_created — created