PROJECT 12 / 18DEVELOPER TOOLSTYPESCRIPT

Source implementation

TrackerMaxxing.

Trace AI usage back to the sessions behind the total.

3local AI source families
SQLitecanonical session cache
JSON · CSV · HTMLexport formats
01 / IDEA02 / SYSTEM03 / PLAYGROUND04 / DECISIONS05 / SOURCE
01 / THE IDEA

A closer look.

A local terminal dashboard for Codex, Claude Code, Cursor and GitHub activity. It normalizes local session files into SQLite, rebuilds daily rollups, queries GitHub activity separately and exposes reports, live sparklines and session-level audit views.

An aggregate can look convincing while counting the same evolving session repeatedly. TrackerMaxxing makes session identity and reconciliation explicit, then distinguishes log-derived token counts, estimated usage and remote activity windows.

01

Provider-specific session parsing

Codex reads token-usage events from JSONL; Claude sums assistant-message usage with duplicate message IDs suppressed. Cursor can reconstruct usage from message and tool content when local exact counts are unavailable.

02

Canonical sessions before totals

Reconciliation upserts by provider plus session path, removes records absent from the current provider snapshot and rebuilds daily rollups from canonical rows. Appended logs update existing sessions instead of becoming new sessions.

03

A terminal dashboard and audit trail

Snapshot reports and an Ink dashboard show provider totals and activity sparklines. A sessions command exposes the largest conversations behind an aggregate, and exports support JSON, CSV and HTML.

04

GitHub activity with separate provenance

The Events API supplies recent daily activity, while Search supplies lifetime and window totals. Existing gh authentication is preferred; optional saved credentials use local AES-GCM encryption.

02 / UNDER THE SURFACE

Normalize first. Reconcile. Then aggregate.

Trace measured and estimated source records through durable session identity.

DRAG TO PAN · SELECT A NODE · + / − TO ZOOM

Read the architecture as text
  1. Codex JSONL — parseCodexJsonl scans session and turn metadata, keeps the latest token-usage record and computes a content hash. Token counts come from recorded usage, not character estimation.
  2. Claude JSONL — parseClaudeJsonl adds input, cache creation, cache read and output usage from assistant messages. seenMessageIds suppresses repeated message IDs.
  3. Cursor estimator — The Cursor adapter reads local database/transcript content. Its fallback uses four characters per token, a modeled context ceiling and compaction; tool results count as later input, not generated output.
  4. Parallel source scan — syncAllLocalAi discovers Codex, Claude and Cursor sessions concurrently, then reconciles each provider before refreshing rollups.
  5. Session identity — The database conflict target is provider plus sessionPath. A growing file changes content hash but retains the same canonical session row.
  6. Snapshot reconciliation — A transaction upserts current sessions and deletes rows no longer present in that provider’s snapshot. It prevents deleted or moved sessions from leaving stale totals.
  7. Canonical SQLite rows — aiSessions persists model, source path, timestamps, token categories, estimated cost and turn count. Checked-in Drizzle migrations define the database schema.
  8. Daily rebuild — refreshAiDailyRollups clears and rebuilds per-provider daily totals from canonical sessions. Sessions are grouped by the UTC date of their first activity.
  9. Unified overview — getUnifiedOverview queries lifetime and provider totals, selected-window daily rows and recent sessions. Costs remain estimates based on the parser’s model pricing heuristics.
  10. GitHub API paths — Recent Events feed daily sparklines. Separate Search calls obtain lifetime and window totals, which can lag until GitHub indexes activity.
  11. CLI + local secrets — The app prefers existing gh authentication. Saved credentials use AES-256-GCM; a local key file is created with mode 0600 unless an environment override is provided.
  12. Ink dashboard — The live terminal view refreshes local display data and remote GitHub activity on separate cadences. Reports combine sources without equating GitHub activity with AI usage.
  13. Session audit — The sessions command surfaces individual high-token sessions so a suspicious total can be traced back to its local record.
  14. Portable reports — runExport assembles AI overview, GitHub activity and lifetime totals, then produces JSON, CSV or self-contained HTML. Exported costs are still estimates.
03 / INTERACTIVE STUDY

What is inside a usage total?

Explore a synthetic set of sessions and see how the share of estimated Cursor usage changes the evidence behind an aggregate.

CHANGE THE INPUTS

Synthetic usage only: this page reads no local files and calls no account APIs. Real Cursor usage and all cost values are estimates; logged counts depend on available source records. Canonical session identity prevents repeated syncs from multiplying rows.

ILLUSTRATIVE MODELLIVE

04 / ENGINEERING CHOICES

Why it works this way.

01

Use paths as the reconciliation key

Session logs grow while an agent works. Keying canonical rows by provider and path allows repeated scans to update totals, while retaining content hashes as source metadata.

02

Rebuild rollups from canonical rows

Daily totals are derived after reconciliation, so removed sessions do not leave stale additive counts. The implementation assigns a session to the UTC day of its first activity.

03

Expose different levels of certainty

Log token counts, reconstructed Cursor usage, heuristic costs, GitHub event windows and Search totals have different meanings. The product documents those boundaries instead of treating every displayed number as a bill.

05 / OPEN THE SOURCE

Trace it back.

Implementation details, examples, and project documentation.

Scope & limitations

  • Cursor token usage is reconstructed when exact local counters are absent, and cost fields use heuristics rather than an invoice. Source logs can be incomplete or change format.
  • Daily AI usage is grouped by session first-activity date rather than an exact per-token timeline. GitHub Events covers a limited recent window; Search totals may lag and depend on token visibility.

Architecture and descriptions reflect the linked repository snapshot. The playground explains a mechanism; it does not execute the repository or report measured performance.