Skip to content

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.

CommandWhat changes
git statusCompact stat format, grouped by state
git logHash + author + subject only
git diffContext reduced, headers stripped
git showSame as diff
git stash listCompact one-line per entry
git ls-tree --name-only / --name-statusConsecutive paths grouped by directory; other formats pass through unchanged

For ls-tree, read src/ lib.rs main.rs as src/lib.rs and src/main.rs. ./ means no directory part in Git’s output; omit that prefix to rebuild the original paths. Paths with spaces or Git C-quoting stand alone in double quotes; Git’s escapes are preserved. Listings that would not shrink pass through unchanged. The hook keeps Git’s original lines when you pipe a foldable listing into head, tail, or cat.

CommandWhat changes
gh pr viewRemoves ASCII art and verbose metadata
gh pr checksStatus + name only, failures highlighted
gh run listCompact workflow run summary
gh issue viewBody only, no decoration
CommandWhat changes
gt logStack summary only
gt statusCurrent branch context
CommandWhat changes
cargo testFailures only, passed tests suppressed
cargo buildErrors and warnings only
cargo checkErrors and warnings only
cargo clippyLint warnings grouped by file
CommandWhat changes
jestFailures only
vitestFailures only
tscType errors grouped by file
eslintViolations grouped by rule
pnpm listCompact dependency tree
pnpm outdatedPackage + current + latest only
next buildRoute summary + errors only
ng buildCompact Angular build tables; every bundle and diagnostic retained
prisma migrateMigration status only
playwright testFailures + trace links only
CommandWhat changes
pytestFailures only
ruff checkViolations grouped by file
mypyType errors grouped by file
pip installInstalled packages only, progress stripped
CommandWhat changes
go testFailures only
golangci-lint runViolations grouped by file
go buildErrors only
CommandWhat changes
rspecFailures only
rubocopOffenses grouped by file
rake testTest task output, failures highlighted
CommandWhat changes
dotnet buildErrors and warnings only
dotnet restoreRestore summary, errors and warnings kept
CommandWhat changes
docker psEssential columns (name, image, status, port)
docker imagesName + tag + size only
docker logsDeduplicated, last N lines
docker compose psContainer status and ports
docker compose logsDeduplicated logs
docker compose buildBuild output, warnings and errors highlighted
kubectl get podsName + status + restarts only
kubectl logsDeduplicated entries
CommandWhat changes
makeErrors and warnings highlighted, noise stripped
CommandWhat changes
lsTree format with file counts
findTree format
grepTruncated lines, grouped by file
ast-grepGrouped by file, capped overflow; --json passes through
diffContext reduced
wcCompact counts
cat <file>Smart file reading via rtk read
head <file>First 10 lines via rtk read --head-lines 10
tail -n <N> <file>Last N lines via rtk read --tail-lines <N>
CommandWhat changes
awsJSON condensed, relevant fields only
psqlQuery results without decoration
curlResponse body only, headers stripped
helm listRelease name, namespace, status, and chart columns
terraform planPlanned changes summary, resource diffs condensed

These flags apply to all RTK commands and must come before the subcommand:

FlagDescription
-v / --verboseShow filtering details on stderr (-v, -vv, -vvv for increasing detail)
Terminal window
# Debug: see what RTK is doing
rtk -vvv git status

If a command isn’t intercepted by the hook rules, RTK runs it through passthrough — the output reaches the LLM unchanged. You can explicitly track unsupported commands:

Terminal window
rtk bypass cargo run # runs cargo run, tracks usage, no filtering

To check whether any command will be rewritten before running it:

Terminal window
rtk rewrite "<command>" # prints the rewritten command, or exits 1 if left alone

To check which commands were missed opportunities: rtk discover.