rtk-ai/rtk

Unwrap uv run <tool> and uvx <tool> before registry lookup

Open

#1.205 geöffnet am 10. Apr. 2026

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (2.914 Forks)batch import
area:clieffort-mediumenhancementhelp wantedpriority:high

Repository-Metriken

Stars
 (48.085 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 1h) (45 gemergte PRs in 30 T)

Beschreibung

Problem

When commands are wrapped with uv run or uvx, RTK fails to rewrite them even when it has a filter for the underlying tool.

Repros (rtk 0.35.0):

$ rtk rewrite "uv run pytest -q"
# exit 1 — no rewrite, even though rtk pytest exists

$ rtk rewrite "uvx ruff check ."
# exit 1 — no rewrite, even though rtk ruff exists

$ rtk rewrite "uv run python3 -c 'print(1)'"
# exit 1 — acceptable, python3 -c has no generic filter

$ rtk rewrite "uv sync"
# exit 3 → rtk uv sync  (uv sync is handled correctly)

Edge cases to consider:

  • uv run -- separator before tool name: uv run -- pytest
  • uv run --with <pkg> <tool>: uv run --with pytest-cov pytest
  • uvx --from <pkg> <tool>: uvx --from ruff ruff check .
  • Nested wrapping: uv run uv run pytest (probably just handle one level)

Expected behavior

uv run pytest -qrtk pytest -q (strip the uv run wrapper, look up pytest in registry) uvx ruff check .rtk ruff check . (same for uvx)

If the unwrapped tool has no RTK filter, fall through to passthrough as today.

Impact

In this project alone: 3,523 uv run invocations and 99 uvx invocations per rtk discover -a — all currently passing through unfiltered.

Contributor Guide