Skip to content

feat(usage): report provider usage summaries #97

Description

@tarik02

Problem

T3 Code aggregates Codex and Claude transcript usage, token counts, API-equivalent costs, cache savings, and source health. The CLI cannot query that summary.

Scope

Add usage summary backed by server.getUsageSummary.

Defaults should match the clients:

  • 30-day window ending today.
  • The CLI machine's IANA time zone.

Allow callers to override the window with a day count or explicit inclusive --since and --until dates, and to override the time zone.

Acceptance criteria

  • Default results cover the same 30-day local-time window as the web and mobile clients.
  • Explicit date bounds require both ends and reject conflicts with a day-count option.
  • JSON output preserves the full server response, including buckets, sources, pricing status, and scan diagnostics.
  • Human output shows totals and clearly reports partial, missing, or failed sources.
  • The command reports one selected environment and does not merge duplicate sources across configured environments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions