Skip to content

feat(opencode): add --since / --until date filters for daily report #867

Description

@daheli

Problem

@ccusage/opencode daily currently does not support date range filtering.

ccusage daily already supports:

  • --since <YYYYMMDD>
  • --until <YYYYMMDD>

But @ccusage/opencode daily --help only shows --json and --compact, so users must pipe JSON to jq for date filtering.

Why this matters

  • Inconsistent UX between ccusage and @ccusage/opencode
  • Harder scripting for common tasks like "last 14 days excluding today/yesterday"
  • Extra dependency on jq for a very common use case

Proposal

Add these options to @ccusage/opencode daily:

  • -s, --since <since> (YYYYMMDD)
  • -u, --until <until> (YYYYMMDD)

Optional (nice to have):

  • support ISO date input (YYYY-MM-DD) as well, with clear validation errors

Expected behavior

npx @ccusage/opencode@latest daily --since 20260211 --until 20260223

Returns only rows within the inclusive range.

Notes

Current workaround:

npx @ccusage/opencode@latest daily --json | jq '...'\n```\n\nbut built-in filtering would be much more ergonomic.

Activity

  1. ryoppippi commented on May 17, 2026

    @ryoppippi
    Member

    Closing during repository triage: this is covered by current main or later merged work.

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