Skip to content

feat: add today and this-week shortcut commands #1300

Description

@zengzuo613

What do you want to change?

Add two new top-level subcommands:

  • ccusage today — shows all-agent daily usage for today only
  • ccusage this-week — shows all-agent daily usage since Monday of the current week

Why?

Checking today's or this week's usage currently requires manually calculating dates and passing --since/--until. These two shortcuts eliminate that friction for the most common quick-check scenarios.

How? (optional)

No response

Activity

  1. pullfrog commented on Jun 12, 2026

    @pullfrog
    Contributor
  2. github-actions commented on Jun 12, 2026

    @github-actions
    Contributor

    This issue was auto-closed. Issues from new contributors are auto-closed by default.

    Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply.

    Keep the issue short, concrete, and written in your own voice.

    If a maintainer replies lgtmi, your future issues will stay open. If a maintainer replies lgtm, your future issues and PRs will stay open.

    See CONTRIBUTING.md.

  3. ryoppippi commented on Jun 14, 2026

    @ryoppippi
    Member

    we had weekly, but actually today command sound really good lol

  4. zengzuo613 commented on Jun 14, 2026

    @zengzuo613
    Author

    we had weekly, but actually today command sound really good lol

    Thanks for the recognition! Like "today", "this-week" is basically just a shortcut for something people do often — it'd be great to also add a "this-month" option.

  5. jsiu93 commented on Jun 15, 2026

    @jsiu93

    I opened #1321 with an implementation for the today and this-week shortcuts.

    Adding a bit more context: I also need this for my own workflow. My company tracks weekly token usage, so having a direct ccusage this-week shortcut makes the reporting flow much simpler than calculating dates manually each time.

    Happy to defer if @lushi516 is already working on an implementation. I already had a tested local version and wanted to share it for review.

  6. ryoppippi commented on Jun 15, 2026

    @ryoppippi
    Member

    for week, why not jq?

  7. ryoppippi commented on Jun 15, 2026

    @ryoppippi
    Member

    we just want to keep ccusage as minimal as possible.
    today does make sense, for week, just use jq to get that last row from ccusage weekly?

  8. jsiu93 commented on Jun 16, 2026

    @jsiu93

    That makes sense, thanks for clarifying.

    I agree this-week overlaps with the existing weekly command, and using jq for the latest weekly row keeps the command surface smaller.

    today still feels like a useful shortcut to me because it maps to a common single-day quick check, but I’m happy to narrow the PR to today only if that fits the project direction better.

  9. zengzuo613 commented on Jun 17, 2026

    @zengzuo613
    Author

    Excuse me. I have an alternative idea to the one I proposed earlier.
    I'd like to propose adding a -l, --last parameter to the daily, weekly, and monthly commands to output statistics for the most recent N units:
    

    ccusage daily --last 1     # today
    ccusage weekly --last 1    # this week
    ccusage monthly --last 1   # this month

    
    This keeps the existing style consistent while making it easy to view today / this week / this month. Since all three commands share the same time-filtering logic and only differ in granularity (day / week / month), the parameter maps naturally to each command's unit, so the implementation stays clean and unified.
    @ryoppippi @jsiu93

  10. deleted a comment from cursor on Jul 27, 2026
  11. ryoppippi commented on Aug 31, 2026

    @ryoppippi
    Member

    Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.

    Audit result: resolved. A later merged change or the current main implementation covers this request. This item is kept for history and does not need to be reopened.

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

    enhancementNew feature or requesttriage:resolvedResolved by a later change or current implementation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions