RTK Inspector

RTK Inspector is a VS Code extension that visualizes how much the rtk CLI is saving you, then compares those savings against your total AI CLI token usage across the tools you already use.
Install it from the Visual Studio Marketplace or Open VSX, and browse the source on GitHub.

Dashboard preview

Why RTK Inspector?
- Track daily RTK savings trends in a sidebar chart.
- Compare RTK input, output, saved tokens, and CLI totals in one place.
- See an honest True Savings % calculation:
saved / (CLI total + RTK input).
- Review per-CLI token usage alongside RTK results.
- Refresh on demand and spot when a newer rtk CLI version is available.
Installation
What the extension reads
RTK Inspector combines RTK output with local session data from supported AI CLIs.
| Source |
Data used |
| rtk CLI |
rtk gain -d -f json |
| GitHub Copilot |
~/.copilot/session-state/*/events.jsonl |
| Gemini CLI |
~/.gemini/tmp/*/chats/session-*.json |
| Claude Code |
~/.claude/projects/**/*.jsonl |
| Codex |
~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl |
Only days where RTK has data are included in the CLI comparison, so the numbers stay aligned.
Requirements and setup
- Install the rtk CLI.
- Make sure
rtk is available in your PATH, or set a custom path with rtk-inspector.executablePath.
- Open the RTK Inspector view from the Activity Bar.
- If you use RTK from WSL while VS Code runs on Windows, enable
rtk-inspector.useWsl.
CLI metrics appear when at least one supported tool has local session data available.
Usage
- Open RTK Inspector in the Activity Bar.
- Review the summary cards and charts in the sidebar.
- Click Refresh RTK Stats to reload RTK data and local CLI usage.
- Expand the commands list in the sidebar to inspect RTK command counts.
Commands
Use the Command Palette to access:
RTK Inspector: Refresh RTK Stats
RTK Inspector: Show RTK Inspector Logs
RTK Inspector: Run RTK Inspector Diagnostics
Settings
rtk-inspector.executablePath: path to the RTK executable. Defaults to rtk.
rtk-inspector.useWsl: runs RTK through wsl.exe -e when VS Code is on Windows and RTK lives in WSL.
Troubleshooting
If the dashboard does not load as expected:
- Run
RTK Inspector: Run RTK Inspector Diagnostics.
- Open
RTK Inspector: Show RTK Inspector Logs.
- Verify that
rtk runs in your shell, or set rtk-inspector.executablePath.
- On Windows + WSL setups, enable
rtk-inspector.useWsl.
For Gemini CLI, the extension uses message output and thought tokens from each session entry to avoid inflating totals with cumulative input counts.
For Codex, the extension reads JSONL rollout files and takes the last cumulative token snapshot per session, counting shell_command function calls and local_shell_call items as tool calls.
Development
License
MIT