Skip to main content

Overview

The daily command displays Claude Code usage statistics aggregated by day. It shows token usage (input, output, cache creation, and cache read tokens), costs, and models used for each day.

Usage

ccusage daily

Flags

Command-Specific Flags

--instances
boolean
default:"false"
Show usage breakdown by project/instance. When enabled, groups data by project directories and displays each project separately.Short flag: -i
--project
string
Filter to specific project name. Only shows usage data for the specified project.Short flag: -p

Common Flags

--since
string
Filter from date in YYYYMMDD format (e.g., 20240301).Short flag: -s
--until
string
Filter until date in YYYYMMDD format (e.g., 20240331).Short flag: -u
--json
boolean
default:"false"
Output in JSON format instead of a formatted table.Short flag: -j
--jq
string
Process JSON output with jq command. Requires jq binary installed. Implies —json.Short flag: -qExample: ccusage daily --jq '.daily[] | select(.totalCost > 0.10)'
--mode
enum
default:"auto"
Cost calculation mode:
  • auto: Use costUSD if exists, otherwise calculate from tokens
  • calculate: Always calculate costs from token counts
  • display: Always use pre-calculated costUSD values
Short flag: -mChoices: auto, calculate, display
--breakdown
boolean
default:"false"
Show per-model cost breakdown. Displays detailed token usage for each model used.Short flag: -b
--offline
boolean
default:"false"
Use cached pricing data for Claude models instead of fetching from API.Short flag: -ONegatable: Use --no-offline to disable
--order
enum
default:"asc"
Sort order:
  • asc: Oldest first
  • desc: Newest first
Short flag: -oChoices: asc, desc
--debug
boolean
default:"false"
Show pricing mismatch information for debugging.Short flag: -d
--debug-samples
number
default:"5"
Number of sample discrepancies to show in debug output.
--timezone
string
Timezone for date grouping (e.g., UTC, America/New_York, Asia/Tokyo). Default: system timezone.Short flag: -z
--locale
string
default:"en-US"
Locale for date/time formatting (e.g., en-US, ja-JP, de-DE).Short flag: -l
--compact
boolean
default:"false"
Force compact mode for narrow displays (better for screenshots).
--config
string
Path to configuration file. Default: auto-discovery.
--color
boolean
Enable colored output (default: auto). FORCE_COLOR=1 has the same effect.
--no-color
boolean
Disable colored output (default: auto). NO_COLOR=1 has the same effect.

Output Formats

Table Output (Default)

Displays a formatted table with columns:
  • Date: Day in YYYY-MM-DD format
  • Input: Input tokens
  • Output: Output tokens
  • Cache Creation: Cache creation tokens
  • Cache Read: Cache read tokens
  • Total: Total tokens
  • Cost: Total cost in USD
  • Models: Models used that day
Includes a totals row at the bottom.
In narrow terminals or with --compact flag, some columns (cache metrics and total tokens) may be hidden. A message will indicate compact mode is active.

JSON Output

With --json flag, outputs structured JSON:
{
  "daily": [
    {
      "date": "2024-03-01",
      "inputTokens": 125000,
      "outputTokens": 15000,
      "cacheCreationTokens": 50000,
      "cacheReadTokens": 10000,
      "totalTokens": 200000,
      "totalCost": 0.85,
      "modelsUsed": ["claude-sonnet-4-20250514"],
      "modelBreakdowns": [
        {
          "model": "claude-sonnet-4-20250514",
          "inputTokens": 125000,
          "outputTokens": 15000,
          "cacheCreationTokens": 50000,
          "cacheReadTokens": 10000,
          "totalCost": 0.85
        }
      ]
    }
  ],
  "totals": {
    "inputTokens": 125000,
    "outputTokens": 15000,
    "cacheCreationTokens": 50000,
    "cacheReadTokens": 10000,
    "totalTokens": 200000,
    "totalCost": 0.85
  }
}

Examples

View March 2024 usage

ccusage daily --since 20240301 --until 20240331

Export usage to JSON file

ccusage daily --json > daily-usage.json

Show usage by project with breakdown

ccusage daily --instances --breakdown

Filter high-cost days using jq

ccusage daily --jq '.daily[] | select(.totalCost > 1.0)'

Show recent 7 days in reverse order

ccusage daily --order desc | head -n 10
  • monthly - View usage grouped by month
  • weekly - View usage grouped by week
  • session - View usage by session
  • blocks - View usage by 5-hour billing blocks

Build docs developers (and LLMs) love