#### Other tools - [`pipx run`](https://pipx.pypa.io/latest/docs/#pipx-run) - [`uv tool`](https://docs.astral.sh/uv/reference/cli/#uv-tool) #### Purpose Install and/or run tools from e.g. PyPI. This would provide functionality similar to `npm install -g`. #### Notes Trickiest bit is the UI for installing versus running such that running is very short when you don't want to bother installing (`py x`?). Another is whether some version restriction could be picked up from `pyproject.toml` or `pylock.toml`? - `--from`: specify what project to install - Support specifiers - `--spec` from pipx - [`--from` from uv](https://docs.astral.sh/uv/reference/cli/#uv-tool-run--from) - Fallback to `-m` if an entry point with the specified name isn't found? - How long to keep around ephemeral environments? - pipx is 14 days - [uv keeps using the cached version indefinitely](https://docs.astral.sh/uv/concepts/tools/#tool-environments) - Can use `@latest` to always check for a newer version - Provide a way to force a fresh install - If a date-based solution is used, provide a way to specify acceptable staleness? - Use installed version from `tool install` or keep separate from `tool run`? - uv shares, but only when a specifier wasn't used to get a specific thing for `run` - Is it worth having a permanent install versus just supporting `py x`? - It certainly looks cleaner to just say e.g. `nox` than `py x nox` - A permanent install also avoids any network access in case the cached copy is too old - How often do people do a permanent install?