Skip to content

Droid Data Source (Experimental)

Droid support is experimental. Expect breaking changes while both ccusage and Droid continue to evolve.

ccusage can read local Droid session settings files as one of its supported data sources, using the same daily, monthly, and session report views as the rest of ccusage.

Focused Views

bash
bunx ccusage droid --help
bash
npx ccusage@latest droid --help
bash
pnpm dlx ccusage droid --help

Data Source

The CLI reads Droid settings JSON files from DROID_SESSIONS_DIR (defaults to ~/.factory/sessions). DROID_SESSIONS_DIR can be one directory or a comma-separated list of directories.

bash
DROID_SESSIONS_DIR="$HOME/.factory/sessions,/backup/factory/sessions" ccusage droid session
text
~/.factory/sessions/
└── **/*.settings.json

Report Views

Focused viewDescriptionSee also
ccusage droid dailyAggregate usage by dateDaily Usage
ccusage droid monthlyAggregate usage by monthMonthly Usage
ccusage droid sessionGroup usage by Droid sessionSession Usage

These views support --json for structured output, --compact for narrow terminals, and --offline for cached pricing data.

What Gets Calculated

  • Token usage - Droid settings files provide input, output, cache creation, cache read, and thinking token counts.
  • Reasoning tokens - Thinking tokens are included in total tokens and output-side cost estimation.
  • Pricing - Costs are calculated from LiteLLM pricing data for the recorded model and provider.

Environment Variables

VariableDescription
DROID_SESSIONS_DIROverride the sessions directory, or comma-separated sessions directories, containing Droid data
LOG_LEVELAdjust verbosity (0 silent ... 5 trace)

Troubleshooting

No Droid usage data found

Ensure the data directory exists at ~/.factory/sessions/ and contains *.settings.json files. Set DROID_SESSIONS_DIR if your Droid data lives elsewhere or in multiple archive roots.

Costs showing as $0.00

If a model is not in LiteLLM's database, the cost will be $0.00. Open an issue to request alias support.

Released under the MIT License.