You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7ae1aec
Browse filesBrowse the repository at this point in the historyBrowse files
feat: add --human/-H flag for human-readable token display
Add a --human / -H CLI flag to all report commands across all apps
(ccusage, codex, opencode, amp, pi) that displays token counts with
K/M/B suffixes (e.g., 1.23M instead of 1,234,567).
Implementation details:
- Add formatNumberHuman() using Intl.NumberFormat compact notation
- Extend formatNumber() with optional humanReadable parameter
- Thread humanReadable through formatUsageDataRow, formatTotalsRow,
pushBreakdownRows and all direct formatNumber callsites
- JSON output remains unchanged (raw numbers always)
- Add comprehensive in-source tests for the new formatter
Closesccusage#958
Co-authored-by: Copilot <[email protected]>
0 commit comments