uv tool install: PATH 안 깨는 첫 글로벌 CLI

글로벌 Python CLI의 첫 정석은 uv tool install과 update-shell.

You installed uv and still type pip install --user or pipx install whenever you want ruff on PATH. The first global CLI path that stays isolated is uv tool install. When a diagram needs a shared page, 지금 시작.

멈출 지점 uv tool install ruff finished, uv tool update-shell is sourced, and a new shell prints ruff --version. 검색어: uv tool install global CLI without breaking PATH. This is not the uv run script guide — see uv run first for that.

uv on PATHuv tool installupdate-shellruff --version
uv tool installglobal binary
update-shellPATH hook
uvxno install

전제

  1. 1
    Install uv

    macOS / Linux: curl -LsSf https://astral.sh/uv/install.sh | sh. Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex". Or brew install uv.

  2. 2
    Confirm uv

    New terminal: uv --version. The standalone installer puts uv on PATH; if not, follow the installer hint for your shell.

첫 도구 글로벌 설치

Official tools docs: uv tool install creates an isolated environment under uv’s tools directory and symlinks console scripts into uv’s executable directory (commonly ~/.local/bin). Dependencies stay out of your project venv and off the system Python.

uv tool install ruff
uv tool list
which ruff
ruff --version

If which ruff is empty, the executable directory is not on PATH. uv prints a warning in that case.

update-shell로 PATH

Docs: uv tool update-shell appends the executable directory to common shell startup files (bash, zsh, fish). Re-open the terminal or source the file it touched, then retry ruff --version.

uv tool update-shell
# open a new terminal
ruff --version

uvx면 충분할 때

One-off runs

uvx ruff check (alias for uv tool run) uses a cached disposable env. Prefer this for occasional commands.

Install for scripts and CI images

Install when another program expects ruff on PATH, your shell profile should always expose the binary, or a Docker image should ship the tool for all users.

pip·pipx 충돌

uv tool install will not overwrite an executable that another installer (e.g. pipx) placed in the same directory unless you pass --force. Migrate by uninstalling the old tool first, then uv tool install.

Success is not “installed with pip somewhere.” Success is ruff --version in a fresh shell after uv tool update-shell.

다음: uv run for scripts · guide · start a room

Is this different from uv pip install?

Yes. uv pip targets a project or explicit environment. uv tool install is the supported path for standalone CLIs with isolated tool environments.

Does install break my project venv?

No. Tool environments live in uv’s tools storage, separate from uv sync / project .venv.

After install, does uvx still fetch latest?

Once installed, uvx ruff uses the installed version by default. Request uvx ruff@latest or uvx --isolated ruff to bypass it.

Windows PATH?

On Windows, executables are copied into the executable directory. Run uv tool update-shell and restart the terminal; if needed, add the path uv prints to your user PATH manually.

지금 시작