Overview
Displays comprehensive statistics about RTK token savings, command usage, and efficiency metrics. Data persists in SQLite database with 90-day retention.
Options
Scope Filters
Show statistics for current project only (filters by working directory)
Display Modes
Show ASCII bar graph of daily savings (last 30 days)
Show recent command history with savings percentages
Show monthly quota savings estimate
Subscription tier for quota calculation:
pro - Pro tier ($20/mo, ~6M tokens/month)
5x - Max 5x tier ($100/mo, ~30M tokens/month)
20x - Max 20x tier ($200/mo, ~120M tokens/month)
Time Breakdowns
Show detailed daily breakdown (all days with activity)
Show all time breakdowns (daily + weekly + monthly)
Output format:
text - Styled terminal output with colors and charts
json - Machine-readable JSON
csv - CSV format for spreadsheet import
Diagnostics
Show parse failure log (commands that fell back to raw execution)
Default Output (Summary)
RTK Token Savings (Global Scope)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Total commands: 1,234
Input tokens: 2.5M
Output tokens: 450K
Tokens saved: 2.05M (82.0%)
Total exec time: 15m 30s (avg 750ms)
Efficiency meter: โโโโโโโโโโโโโโโโโโโโโโโโ 82.0%
By Command
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Command Count Saved Avg% Time Impact
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1. rtk cargo test 234 890K 92.1% 2.3s โโโโโโโโโโ
2. rtk git status 456 650K 71.5% 450ms โโโโโโโโโโ
3. rtk tsc 89 310K 85.2% 1.8s โโโโโโโโโโ
4. rtk grep 123 105K 76.3% 120ms โโโโโโโโโโ
...
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Output with Flags
Graph (-g)
Daily Savings (last 30 days)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
01-15 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 45K
01-16 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 62K
01-17 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 38K
...
History (-H)
Recent Commands
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
01-20 14:32 โฒ rtk cargo test -92% (890K)
01-20 14:28 โ rtk git status -71% (12K)
01-20 14:15 โข rtk grep "TODO" -76% (8K)
...
Legend:
โฒ - High savings (โฅ70%)
โ - Medium savings (30-70%)
โข - Low savings (<30%)
Quota (-q)
Monthly Quota Analysis
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Subscription tier: Max 20x ($200/mo)
Estimated monthly quota: 120M
Tokens saved (lifetime): 2.05M
Quota preserved: 1.7%
Note: Heuristic estimate based on ~44K tokens/5h (Pro baseline)
Actual limits use rolling 5-hour windows, not monthly caps.
Project Scope (-p)
RTK Token Savings (Project Scope)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Scope: /Users/dev/projects/my-app
Total commands: 156
Input tokens: 350K
Output tokens: 82K
Tokens saved: 268K (76.6%)
Failures (-F)
RTK Parse Failures
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Total failures: 23
Recovery rate: 100.0%
Top Commands (by frequency):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
5x git log --graph --all --decorate --oneline
3x find . -name "*.rs" -type f -exec grep -H ...
2x docker ps -a --format "table {{.Names}}\t{{...
Recent Failures (last 10):
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
2026-01-20 14:45 [ok] git log --graph --all
2026-01-20 12:30 [ok] find . -name "*.tmp" -delete
{
"summary" : {
"total_commands" : 1234 ,
"total_input" : 2500000 ,
"total_output" : 450000 ,
"total_saved" : 2050000 ,
"avg_savings_pct" : 82.0 ,
"total_time_ms" : 930000 ,
"avg_time_ms" : 753
},
"daily" : [
{
"date" : "2026-01-20" ,
"commands" : 45 ,
"input_tokens" : 120000 ,
"output_tokens" : 28000 ,
"saved_tokens" : 92000 ,
"savings_pct" : 76.7 ,
"total_time_ms" : 34500 ,
"avg_time_ms" : 767
}
]
}
date, commands, input_tokens, output_tokens, saved_tokens, savings_pct, total_time_ms, avg_time_ms
2026-01-20, 45, 120000, 28000, 92000, 76.67, 34500, 767
2026-01-19, 52, 135000, 31000, 104000, 77.04, 38200, 735
Database Location
Default: ~/.local/share/rtk/tracking.db
Customize via:
Environment variable: RTK_DB_PATH=/custom/path.db
Config file: ~/.config/rtk/config.toml
[ tracking ]
database_path = "/custom/path.db"
Token Savings Methodology
RTK measures savings by comparing:
Input tokens : Character count of raw command output รท 4
Output tokens : Character count of RTK filtered output รท 4
Saved tokens : Input tokens - Output tokens
Savings % : (Saved tokens รท Input tokens) ร 100
Note : Division by 4 is a rough heuristic (Claude 3.5 Sonnet averages ~4 chars/token). Actual tokenization varies by content.
Example: Default summary
Example: Project scope
Example: With graph and history
Example: Quota analysis
Example: Full breakdown
Example: Export to JSON
Example: Check failures
rtk gain
# Shows overall stats + top commands
Exit Codes
0 - Success (always succeeds)
rtk discover - Find missed RTK opportunities in Claude Code history
rtk config - View/edit configuration
rtk init --show - Show installation status