codex

July 20, 2026 · View on GitHub

Codex (OpenAI) usage reports and native quota views under a hierarchical subgroup. daily/monthly/session are drop-ins for ccusage codex <cmd> — paste a ccusage codex … command verbatim and it runs offline. weekly is a cctally extension (upstream has no ccusage codex weekly).

The four accounting leaves share their engine with the matching flat cctally codex-<cmd> alias — the output (table / --json / exit code) is identical. The flat codex-* forms remain fully supported as back-compat aliases (drop-ins for the standalone ccusage-codex binary); the subgroup form is the canonical, going-forward syntax for the hierarchical ccusage codex … surface. The provider-aware leaves below pin the matching shared command to Codex instead.

Provider-aware analytics

Alongside the existing Codex compatibility reports, the codex subgroup pins the five shared analytics leaves to the Codex provider:

cctally codex project
cctally codex diff
cctally codex range-cost
cctally codex cache-report
cctally codex report

These are fixed-source aliases for the corresponding flat commands with --source codex; they intentionally do not accept a contradictory --source flag. The parallel cctally claude {project,diff,range-cost,cache-report,report} forms pin Claude. There is no cctally all subgroup: use the flat command with --source all, which always renders Claude then Codex instead of blending provider-native rows.

Use cctally codex cache-report for Codex token reuse (inclusive input, cached input, non-cached input, reasoning-inclusive output, and native cost), not a Claude cache-hit rate. Use cctally codex report for independent native quota-window/logical-limit series; it never turns them into a single Codex or cross-provider weekly percentage.

The older codex-daily, codex-monthly, codex-weekly, and codex-session commands remain their existing accounting-report family. Their ordinary terminal/JSON/empty output is unchanged; they now also accept read-only --config PATH and the share output flags documented in share.md.

Synopsis

cctally codex <command> [flags]

<command> ∈ { daily, monthly, session, weekly, project, diff, range-cost, cache-report, report, percent-breakdown, quota }

Subcommands

SubcommandSame engine asDrop-in forPage
cctally codex dailycctally codex-dailyccusage codex dailycodex-daily.md
cctally codex monthlycctally codex-monthlyccusage codex monthlycodex-monthly.md
cctally codex sessioncctally codex-sessionccusage codex sessioncodex-session.md
cctally codex weeklycctally codex-weeklycctally extensioncodex-weekly.md
cctally codex projectcctally project --source codexcctally extensionproject.md
cctally codex diffcctally diff --source codexcctally extensiondiff.md
cctally codex range-costcctally range-cost --source codexcctally extensionrange-cost.md
cctally codex cache-reportcctally cache-report --source codexcctally extensioncache-report.md
cctally codex reportcctally report --source codexcctally extensionreport.md
cctally codex percent-breakdownnative seven-day quota milestonescctally extensioncodex-percent-breakdown.md
cctally codex quota …native nested surfacecctally extensioncodex-quota.md

For the four accounting leaves, every flag, exit code, and output shape is exactly that of the linked flat page — there are no behavior differences. The provider-aware leaves follow their linked shared-command reference with the source fixed to Codex. The native quota surface has its own reference below.

Examples

cctally codex daily --since 2026-05-01
cctally codex monthly --breakdown
cctally codex session --json
cctally codex weekly
cctally codex percent-breakdown
cctally codex quota statusline
cctally codex quota forecast --json

Notes

  • Naming convention: the flat hyphenated codex-* forms are drop-ins for the standalone ccusage-codex binary; the hierarchical codex <cmd> subgroup is the drop-in for upstream's ccusage codex <cmd> subgroup. cctally mirrors upstream's own dual surface one-to-one.
  • cctally codex weekly (and the flat cctally codex-weekly) have no upstream counterpart — week-start day is read from config.json.
  • cctally codex quota is a native, nested-only cctally extension. It has no flat codex-quota alias and is not a ccusage-codex drop-in. Its five leaves keep every source root and logical quota limit independent; see codex-quota.md for selectors, local-rollout freshness, and the JSON contracts.
  • --speed {auto,standard,fast} is accepted by the four accounting leaves (daily, monthly, session, and weekly), the five fixed-source provider-aware analytics leaves (project, diff, range-cost, cache-report, and report), cctally codex percent-breakdown, and cctally codex quota breakdown. For the fixed-source analytics leaves it selects the Codex query-time pricing tier just as --source codex does on their flat counterparts; it does not change their fixed Codex source. On quota it is accepted only by breakdown, where it selects query-time cost correlation; the other quota leaves do not accept --speed. On the accounting subgroup forms this is faithful to ccusage codex <cmd> --speed; on the flat codex-* aliases it is a cctally extension (the standalone ccusage-codex binary has no --speed). auto (the default) reads service_tier from ~/.codex/config.toml. See the relevant leaf page's "Pricing tier (--speed)" section for details.
  • Totals lower than ccusage-codex? Expected on older sessions, and cctally is the accurate one — older Codex CLI versions re-emit duplicate token_count events, which ccusage-codex double-counts (up to ~2×) while cctally dedups to match Codex's own ledger. Recent sessions match byte-for-byte. See codex-daily · duplicate-event divergence.
  • Bare cctally codex (no subcommand) exits non-zero with a command-required error.
  • No runtime deprecation warning is emitted by the flat forms; they are non-canonical, not deprecated.

See also