Back to Rtk

What RTK Optimizes

docs/guide/resources/what-rtk-covers.md

0.38.05.0 KB
Original Source

What RTK Optimizes

Once RTK is installed with a hook, these commands are automatically intercepted and filtered. You run them normally — the hook rewrites them transparently before execution.

Typical savings: 60-99%.

Git

CommandSavingsWhat changes
git status75-93%Compact stat format, grouped by state
git log80-92%Hash + author + subject only
git diff70%Context reduced, headers stripped
git show70%Same as diff
git stash list75%Compact one-line per entry

GitHub CLI

CommandSavingsWhat changes
gh pr view87%Removes ASCII art and verbose metadata
gh pr checks79%Status + name only, failures highlighted
gh run list82%Compact workflow run summary
gh issue view80%Body only, no decoration

Graphite (Stacked PRs)

CommandSavingsWhat changes
gt log75%Stack summary only
gt status70%Current branch context

Cargo / Rust

CommandSavingsWhat changes
cargo test90%Failures only, passed tests suppressed
cargo nextest90%Same as test
cargo build80%Errors and warnings only
cargo check80%Errors and warnings only
cargo clippy80%Lint warnings grouped by file

JavaScript / TypeScript

CommandSavingsWhat changes
jest94-99%Failures only
vitest94-99%Failures only
tsc75%Type errors grouped by file
eslint84%Violations grouped by rule
pnpm list70-90%Compact dependency tree
pnpm outdated70%Package + current + latest only
next build80%Route summary + errors only
prisma migrate75%Migration status only
playwright test90%Failures + trace links only

Python

CommandSavingsWhat changes
pytest80-90%Failures only
ruff check75%Violations grouped by file
mypy75%Type errors grouped by file
pip install70%Installed packages only, progress stripped

Go

CommandSavingsWhat changes
go test80-90%Failures only
golangci-lint run75%Violations grouped by file
go build75%Errors only

Ruby

CommandSavingsWhat changes
rspec80-90%Failures only
rubocop75%Offenses grouped by file
rake70%Task output, build errors highlighted

.NET

CommandSavingsWhat changes
dotnet build80%Errors and warnings only
dotnet test85-90%Failures only
dotnet format75%Changed files only

Docker / Kubernetes

CommandSavingsWhat changes
docker ps65%Essential columns (name, image, status, port)
docker images60%Name + tag + size only
docker logs70%Deduplicated, last N lines
docker compose up75%Service status, errors highlighted
kubectl get pods65%Name + status + restarts only
kubectl logs70%Deduplicated entries
CommandSavingsWhat changes
ls80%Tree format with file counts
find75%Tree format
grep70%Truncated lines, grouped by file
diff65%Context reduced
wc60%Compact counts
cat / head / tail <file>60-80%Smart file reading via rtk read
rtk smart <file>85%2-line heuristic code summary (signatures only)

Cloud and Data

CommandSavingsWhat changes
aws70%JSON condensed, relevant fields only
psql65%Query results without decoration
curl60%Response body only, headers stripped

Global flags

These flags apply to all RTK commands and can push savings even higher:

FlagDescription
--ultra-compactASCII icons, inline format — extra token reduction on top of normal filtering
-v / --verboseShow filtering details on stderr (-v, -vv, -vvv for increasing detail)
bash
# Ultra-compact: even smaller output
rtk git log --ultra-compact

# Debug: see what RTK is doing
rtk git status -vvv

:::note Use --ultra-compact (long form) rather than -u when working with Git commands. Git's own -u flag means --set-upstream and the short form can cause confusion. :::

Commands that are not rewritten

If a command isn't in the list above, RTK runs it through passthrough — the output reaches the LLM unchanged. You can explicitly track unsupported commands:

bash
rtk proxy make install    # runs make install, tracks usage, no filtering

To check which commands were missed opportunities: rtk discover.