Skip to content

feat: support human-readable token count display (K/M/B suffixes) #958

Description

@jay-tau

Problem

Large token counts (e.g., 1,234,567) are hard to scan visually in terminal output. Users would benefit from an option to display token counts in compact, human-readable format with K/M/B suffixes.

Proposed Solution

Add a --human / -H CLI flag to all report commands (daily, weekly, monthly, session, blocks) across all apps (ccusage, codex, opencode, amp, pi). When enabled, token counts would display as compact values:

Raw Human-Readable
1,234,567 1.23M
500,000 500K
2,500 2.5K
999 999

Implementation Notes

  • Use Intl.NumberFormat with notation: 'compact' for standards-based formatting
  • JSON output should remain unchanged (raw numbers always)
  • Only affects table/terminal display
  • The flag should be available across all apps, not just ccusage

Related

Activity

  1. added 2 commits that reference this issue on Apr 23, 2026
    7ae1aec
    95e0ad0
  2. ryoppippi commented on May 19, 2026

    @ryoppippi
    Member

    Thank you for the report/suggestion and for the related TypeScript-era work.

    I am sorry that the Rust migration made the original TypeScript implementation no longer mergeable as-is. The production CLI has moved from the TypeScript implementation to the Rust implementation under rust/crates/ccusage. The related TypeScript PR has been closed as obsolete, so I am closing this issue as well to keep the tracker focused.

    If this behavior is still needed, please open a fresh issue or PR against the current Rust CLI with current-version output and a minimal reproduction or concrete use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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