How It Works
cli-usage

See where your
AI tokens go

Run one command to get a clear token report from your local CLI activity, grouped by app, model, and time range so you can spot trends and manage usage confidently.

Tracks usage from

Codex
GitHub Copilot Copilot CLI
cli-usage
bunx @f6n/cli-usage
+---------+---------+---------------+----------+--------+--------+--------+-----------+---------+
| Day | App | Model | Sessions | Input | Cached | Output | Reasoning | Total |
+---------+---------+---------------+----------+--------+--------+--------+-----------+---------+
| Mar 01 | codex | o3 | 6 | 54,800 | 9,200 | 14,900 | 2,700 | 81,600 |
| Mar 01 | copilot | gpt-5.3-codex | 4 | 88,300 | 12,400 | 27,600 | 5,100 | 133,400 |
| Feb 28 | codex | gpt-4.1 | 3 | 29,500 | 4,100 | 8,600 | 1,300 | 43,500 |
| Feb 28 | copilot | claude-sonnet | 7 | 132,900| 18,700 | 49,200 | 8,800 | 209,600 |
+---------+---------+---------------+----------+--------+--------+--------+-----------+---------+

Beautiful terminal reports

Smart view selection: session rows for the newest activity, daily summaries for recent history, and monthly rollups for longer ranges.

  • Codex local session files
  • Persisted summaries from @f6n/copilot-usage
  • Combined reporting from @f6n/cli-usage
  • Copilot history before capture can be ephemeral

Up and running in 2 steps

Capture Copilot usage as you work, then run one combined token report.

1

Capture Copilot usage

Run Copilot through @f6n/copilot-usage — it installs a session hook in your repo and captures token usage automatically on session end.

bunx @f6n/copilot-usage

Codex sessions are parsed automatically from local files — no extra command needed to capture them.

2

View your report

See Codex + Copilot usage in one combined report.

bunx @f6n/cli-usage

What's in the report?

Each row matches the real CLI schema and auto-selects the right view for your time range.

  • Views: sessions under 1 day, daily under 1 month, monthly beyond that
  • Columns: Input, Cached, Output, Reasoning, Total
  • No wrapping on mobile: swipe horizontally to inspect wide rows
  • Grouped by app and model across Codex + Copilot
  • Sessions column for rollups, session IDs in session view
  • Copilot history is durable only after capture starts

Everything you need
to track AI usage

Capture Copilot usage with @f6n/copilot-usage, then use @f6n/cli-usage for one combined Codex + Copilot report.

📊

Smart time grouping

Under 1 day of activity? Session table. Under 1 month? Daily table. Longer? Monthly rollups. Always the right view.

🔄

Tandem packages

@f6n/copilot-usage captures and persists Copilot usage records. @f6n/cli-usage merges them with Codex data.

👁️

Forward-looking capture

Historical Copilot usage can disappear from local state. Capture going forward to build a durable history.

🔧

No setup required

Run capture and report commands directly. State files are created automatically as usage is recorded.

🖥️

Real token columns

Reports the same token fields as the CLI table: Input, Cached, Output, Reasoning, and Total.

📝

Combined by app + model

Compare Codex and Copilot usage in one table, grouped consistently by app, model, and time period.

What CLI Usage gives you

@f6n/cli-usage is your reporting view: how many tokens were used, by which app, model, and time period, in one readable table.

Know your AI spend

Use two CLIs together: capture with @f6n/copilot-usage, report with @f6n/cli-usage. No API keys, no dashboards, no cloud.