{
  "id": "ccusage",
  "name": "ccusage",
  "homepage": "https://github.com/ccusage/ccusage",
  "description": "A CLI tool for analyzing Claude Code usage from local JSONL files.",
  "executables": [
    "ccusage"
  ],
  "dotfiles": {
    "paths": [
      "~/.config/claude/ccusage.json",
      "~/.claude/ccusage.json"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Usage report",
    "description": "Report Claude Code (and other coding CLI) token usage and cost by day, week, month or session. Blocks, statusline, per-agent namespaces and config-file options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://github.com/ccusage/ccusage/blob/main/docs/guide/cli-options.md",
        "revision": "2026-10-27",
        "evidence": "ccusage daily --since 20260101 --until 20260531\nccusage monthly --since 20260101\nccusage session --until 20260531\nccusage weekly --last 1\nccusage daily --json\nccusage daily -j\nccusage daily --breakdown\nccusage daily -b\nccusage daily --no-cost\nccusage daily --mode auto\nccusage daily --mode calculate\nccusage daily --mode display\nccusage daily --order desc\nccusage daily --order asc\nccusage daily --offline\nccusage daily -O\nccusage daily -z Asia/Tokyo\nccusage daily --timezone America/New_York\nccusage daily --instances\nccusage daily -i\nccusage daily --project myproject\nccusage daily -p myproject\n"
      }
    ],
    "field": [
      {
        "id": "report",
        "label": "Report",
        "description": "Which grouping to report.",
        "type": "enum",
        "position": 0,
        "choices": [
          {
            "value": "daily",
            "label": "Daily"
          },
          {
            "value": "weekly",
            "label": "Weekly"
          },
          {
            "value": "monthly",
            "label": "Monthly"
          },
          {
            "value": "session",
            "label": "Session"
          }
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "since",
        "label": "Since",
        "description": "Inclusive start date, YYYY-MM-DD or YYYYMMDD.",
        "type": "string",
        "option": [
          "--since"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "until",
        "label": "Until",
        "description": "Inclusive end date, YYYY-MM-DD or YYYYMMDD.",
        "type": "string",
        "option": [
          "--until"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "json",
        "label": "JSON output",
        "type": "boolean",
        "option": [
          "--json",
          "-j"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "breakdown",
        "label": "Per-model breakdown",
        "type": "boolean",
        "option": [
          "--breakdown",
          "-b"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "no_cost",
        "label": "Hide cost",
        "type": "boolean",
        "option": [
          "--no-cost"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "order",
        "label": "Sort order",
        "type": "enum",
        "option": [
          "--order"
        ],
        "choices": [
          {
            "value": "desc",
            "label": "Newest first"
          },
          {
            "value": "asc",
            "label": "Oldest first"
          }
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "mode",
        "label": "Cost mode",
        "type": "enum",
        "option": [
          "--mode"
        ],
        "choices": [
          {
            "value": "auto",
            "label": "Auto"
          },
          {
            "value": "calculate",
            "label": "Calculate from tokens"
          },
          {
            "value": "display",
            "label": "Pre-calculated only"
          }
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "offline",
        "label": "Offline",
        "description": "Use cached pricing data.",
        "type": "boolean",
        "option": [
          "--offline",
          "-O"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "timezone",
        "label": "Timezone",
        "type": "string",
        "option": [
          "--timezone",
          "-z"
        ],
        "suggestions": [
          {
            "value": "UTC",
            "label": "UTC"
          },
          {
            "value": "local",
            "label": "System"
          },
          {
            "value": "America/New_York",
            "label": "New York"
          },
          {
            "value": "Asia/Tokyo",
            "label": "Tokyo"
          }
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "instances",
        "label": "Group by project",
        "description": "Daily report only.",
        "type": "boolean",
        "option": [
          "--instances",
          "-i"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "project",
        "label": "Project",
        "description": "Daily report only.",
        "type": "string",
        "option": [
          "--project",
          "-p"
        ],
        "sources": [
          "docs"
        ]
      }
    ],
    "task": [
      {
        "id": "daily",
        "label": "Daily usage",
        "set": {
          "report": [
            "daily"
          ]
        },
        "lock": [
          "report"
        ],
        "fields": [
          "report",
          "since",
          "until",
          "breakdown",
          "instances",
          "project",
          "order",
          "offline"
        ],
        "required": [
          "report"
        ]
      },
      {
        "id": "monthly-json",
        "label": "Monthly JSON",
        "set": {
          "report": [
            "monthly"
          ],
          "json": [
            true
          ]
        },
        "lock": [
          "report",
          "json"
        ],
        "fields": [
          "report",
          "json",
          "since",
          "until",
          "timezone"
        ],
        "required": [
          "report"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "report",
          "since",
          "until",
          "json",
          "breakdown",
          "order"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "no_cost",
          "mode",
          "offline",
          "timezone",
          "instances",
          "project"
        ]
      }
    ]
  }
}
