Skip to content

Support npx @ccusage/codex@latest last --day 7 #906

@Cheese-Yu

Description

@Cheese-Yu

Add support for querying usage over the last N days (excluding today), for example:

npx @ccusage/codex@latest last --day 7

This should return usage from the previous 7 full days (yesterday going backwards), excluding the current day.

Expected Behavior:

  • --day N returns data from (today - N) to (yesterday)
  • Today is always excluded to avoid partial data

Example:
If today is March 25, --day 7 → March 18–24

This would help with consistent short-term usage analysis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions