Skip to main content

Overview

Displays comprehensive statistics about RTK token savings, command usage, and efficiency metrics. Data persists in SQLite database with 90-day retention.

Syntax

Options

Scope Filters

flag
Show statistics for current project only (filters by working directory)

Display Modes

flag
Show ASCII bar graph of daily savings (last 30 days)
flag
Show recent command history with savings percentages
flag
Show monthly quota savings estimate
string
default:"20x"
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

flag
Show detailed daily breakdown (all days with activity)
flag
Show weekly breakdown
flag
Show monthly breakdown
flag
Show all time breakdowns (daily + weekly + monthly)

Export Formats

string
default:"text"
Output format:
  • text - Styled terminal output with colors and charts
  • json - Machine-readable JSON
  • csv - CSV format for spreadsheet import

Diagnostics

flag
Show parse failure log (commands that fell back to raw execution)

Default Output (Summary)

Output with Flags

Graph (-g)

History (-H)

Legend:
  • โ–ฒ - High savings (โ‰ฅ70%)
  • โ–  - Medium savings (30-70%)
  • โ€ข - Low savings (<30%)

Quota (-q)

Project Scope (-p)

Failures (-F)

JSON Export Format

CSV Export Format

Database Location

Default: ~/.local/share/rtk/tracking.db Customize via:
  • Environment variable: RTK_DB_PATH=/custom/path.db
  • Config file: ~/.config/rtk/config.toml

Token Savings Methodology

RTK measures savings by comparing:
  1. Input tokens: Character count of raw command output รท 4
  2. Output tokens: Character count of RTK filtered output รท 4
  3. Saved tokens: Input tokens - Output tokens
  4. 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.

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