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.
Consecutive 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.
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
rtkbypasscargorun# runs cargo run, tracks usage, no filtering
To check whether any command will be rewritten before running it:
Terminal window
rtkrewrite"<command>"# prints the rewritten command, or exits 1 if left alone
To check which commands were missed opportunities: rtk discover.