Skip to main content
All ccusage commands support a comprehensive set of CLI options for customizing output, filtering data, and controlling behavior.

Global Options

These options are available across all commands (daily, monthly, session, blocks, statusline).

Output Format

--json
boolean
default:"false"
Output results in JSON format instead of formatted tables.
ccusage daily -j
--jq
string
Process JSON output with jq command. Automatically implies --json. Requires jq binary to be installed.
ccusage daily --jq '.[] | select(.totalCost > 1.0)'
The jq binary must be available in your PATH for this option to work.

Display Options

--color
boolean
Enable colored output. Defaults to auto-detection based on terminal capabilities.
ccusage daily --color
You can also set FORCE_COLOR=1 environment variable to enable colors.
--no-color
boolean
Disable colored output. Overrides auto-detection and color settings.
ccusage daily --no-color
You can also set NO_COLOR=1 environment variable to disable colors.
--compact
boolean
default:"false"
Force compact mode for narrow displays. Better for screenshots and constrained terminal widths.
ccusage daily --compact

Date Filtering

--since
string
Filter from date in YYYYMMDD format. Limits results to data from this date onwards.
ccusage daily -s 20240101
--until
string
Filter until date in YYYYMMDD format. Limits results to data up to and including this date.
ccusage daily -u 20240131
Both --since and --until can be combined to create a date range.

Cost Calculation

--mode
enum
default:"auto"
Control cost calculation mode:
  • auto - Use pre-calculated costUSD when available, otherwise calculate from tokens
  • calculate - Always calculate costs from token counts using model pricing, ignore costUSD
  • display - Always use pre-calculated costUSD values, show 0 for missing costs
ccusage daily -m calculate
The calculate mode is useful for verifying pricing consistency or when costUSD is missing.
--offline
boolean
default:"false"
Use cached pricing data for Claude models instead of fetching from LiteLLM API.
ccusage daily -O
Offline mode uses cached pricing data and doesn’t require internet access.

Sorting

--order
enum
default:"asc"
Sort order for results:
  • asc - Oldest first (chronological order)
  • desc - Newest first (reverse chronological order)
ccusage daily -o desc

Model Breakdown

--breakdown
boolean
default:"false"
Show per-model cost breakdown in the output. Displays token counts and costs for each Claude model used.
ccusage daily -b

Localization

--timezone
string
Timezone for date grouping (e.g., UTC, America/New_York, Asia/Tokyo). Defaults to system timezone.
ccusage daily -z UTC
Valid timezone names follow the IANA Time Zone Database format.
--locale
string
default:"en-CA"
Locale for date/time formatting (e.g., en-US, ja-JP, de-DE).
ccusage daily -l ja-JP

Configuration

--config
string
Path to configuration file. Defaults to auto-discovery from standard locations.
ccusage daily --config /path/to/custom-config.json
See Config Files for configuration file format and options.

Debugging

--debug
boolean
default:"false"
Show pricing mismatch information for debugging. Displays discrepancies between calculated and pre-calculated costs.
ccusage daily -d
--debug-samples
number
default:"5"
Number of sample discrepancies to show in debug output. Only used when --debug is enabled.
ccusage daily --debug --debug-samples 10

Examples

Basic Usage

# Daily report with JSON output
ccusage daily --json

# Monthly report with model breakdown
ccusage monthly --breakdown

# Session report sorted by newest first
ccusage session --order desc

Date Range Filtering

# Usage for January 2024
ccusage daily --since 20240101 --until 20240131

# Usage from specific date onwards
ccusage monthly --since 20240301

Advanced Options

# Calculate costs with offline pricing in Tokyo timezone
ccusage daily --mode calculate --offline --timezone Asia/Tokyo

# Debug mode with custom sample count
ccusage daily --debug --debug-samples 20

# Custom config with jq filtering
ccusage daily --config ~/.ccusage.json --jq '.[] | select(.totalCost > 5.0)'

Output Customization

# Compact mode with no colors
ccusage daily --compact --no-color

# Japanese locale with UTC timezone
ccusage monthly --locale ja-JP --timezone UTC

Build docs developers (and LLMs) love