Notes toward a native Swift CLI (à la ccusage) that works correctly on enterprise accounts.
ccusage computes costs by scanning ~/.claude/projects/**/*.jsonl and multiplying token counts by retail pricing. On enterprise accounts Claude Code sets costUSD = 0 in its own tracking, so ccusage backs out costs from tokens instead. The retail-rate total diverges from the actual enterprise spend (observed ~20% gap in one billing period). For quota tracking you want the real number.