Skip to content

Data Sources

Each adapter owns discovery and source-specific parsing. After parsing, every adapter returns the same normalized UsageEvent shape, so reports and filters behave the same across tools.

Source Local format Default location
pi JSONL ~/.pi/agent/sessions and ~/.omp/agent/sessions
codex JSONL ~/.codex/sessions
Gemini CLI JSON ~/.gemini/tmp/*/chats
Droid CLI settings JSON ~/.factory/sessions
OpenCode SQLite platform data directory, including opencode-<channel>.db
OpenClaw JSONL ~/.openclaw/agents and supported legacy homes
Claude Code JSONL ~/.claude/projects and ~/.claude/transcripts
Copilot CLI OTEL JSONL ~/.copilot/otel
Goose SQLite platform Goose data directory
Amp JSON ~/.local/share/amp/threads
Qwen CLI JSONL ~/.qwen/projects
Kimi wire JSONL ~/.kimi/sessions and ~/.kimi-code/sessions
Cline task JSON VS Code global storage for saoudrizwan.claude-dev
RooCode task JSON VS Code global storage for rooveterinaryinc.roo-cline
KiloCode task JSON VS Code global storage for kilocode.kilo-code
Antigravity SQLite ~/.gemini/antigravity-cli/conversations

SQLite-backed sources use the built-in node:sqlite module and require Node.js 24 or newer.

Terminal window
llm-usage doctor
llm-usage doctor --source codex,claude

Doctor checks discovery without parsing session contents or loading pricing. Use it before adding overrides: an empty report can also result from date, provider, or model filters.

Directory-backed sources accept a named flag and the generic repeatable form:

Terminal window
llm-usage monthly --codex-dir /path/to/codex/sessions
llm-usage monthly --source-dir codex=/path/to/codex/sessions

SQLite sources use their database flags:

Terminal window
llm-usage monthly --opencode-db /path/to/opencode.db
llm-usage monthly --goose-db /path/to/goose/sessions.db

Persist paths in the TOML config when you use them often:

[sourceDirs]
codex = "/path/to/codex/sessions"
claude = "/path/to/claude/projects"
opencode = "/path/to/opencode.db"

CLI flags win over config values. Configuration documents the full precedence order.

Terminal window
llm-usage monthly --source codex
llm-usage monthly --source codex,claude,opencode

The source identifies the tool that wrote the session. It does not identify the billing provider. Use --provider openai, for example, when you want events billed through OpenAI across multiple source tools.

The pages in this section document each source’s discovery roots, parsed record types, token semantics, repository attribution, and explicit path behavior. Those details matter when a source’s own dashboard disagrees with a report because the two products may normalize tokens differently.