micky@garden:~/rtk-context-meter$cd ..

rust token killer / exact-output lab

RTK output lab

See exactly what an AI agent receives with and without RTK. Pick a command — the panes below show the raw terminal output next to what the pinned RTK release returns instead.

Pinned READMEPinned architecturePinned releasechecked 2026-04-29 / RTK 0.37.2 / 80a6fe6

Pick a command

Each example is generated by running RTK against a deterministic fixture, so the panes stay tied to the same formatter code as the CLI.

14 examples
git
search
data
summary
files
logs
errors
without RTKwhat your terminal shows
$ git status
Git's normal status output13 lines / 385 chars
On branch main
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   src/math.ts

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	docs/
	sample.json
	src/app.ts

no changes added to commit (use "git add" and/or "git commit -a")
with RTKwhat your AI agent reads
$ rtk git status
RTK's compact status output7 lines / 100 chars
* main
~ Modified: 1 files
   src/math.ts
? Untracked: 3 files
   docs/
   sample.json
   src/app.ts
−285chars saved (74% smaller)137 lines / 385100 chars

under the hood

Where the output changes

RTK sits between the shell command and the agent context. These four steps explain why the two panes above are different.

  1. 01ask

    The agent asks for the normal command

    In hook mode, the assistant can request a familiar shell command such as git status. RTK's hook can rewrite that request before the shell executes it.

    note The input shown in the examples is the command being compared; it is not pulled from personal command history.

  2. 02route

    RTK receives the equivalent command

    RTK routes the request to a command-specific handler: git status, git diff, grep, json, read, smart, and other modules each have their own output strategy.

    note This page uses explicit RTK commands so the before/after comparison is reproducible.

  3. 03run

    The handler gets source output

    Proxy handlers execute the real CLI and capture stdout/stderr. Built-in handlers read files, JSON, logs, or command output directly before formatting it.

    note The examples are generated by running the pinned RTK release against a deterministic synthetic fixture.

  4. 04filter

    Output is rewritten for the context window

    The output can become shorter, grouped, reordered, or annotated. The goal is not byte-for-byte fidelity; it is lower-noise output for an agent.

    note For exact raw terminal output, run the command without RTK.