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 Real logs
pi JSONL ~/.pi/agent/sessions and ~/.omp/agent/sessions checked
codex JSONL ~/.codex/sessions (or $CODEX_HOME/sessions) checked
Gemini CLI JSON ~/.gemini/tmp/*/chats checked
Droid CLI settings JSON ~/.factory/sessions not yet
OpenCode SQLite platform data directory, including opencode-<channel>.db checked
OpenClaw JSONL ~/.openclaw/agents and supported legacy homes not yet
Claude Code JSONL ~/.claude/projects and ~/.claude/transcripts (or under $CLAUDE_CONFIG_DIR) checked
Copilot CLI OTEL JSONL ~/.copilot/otel not yet
Goose SQLite platform Goose data directory not yet
Amp JSON $XDG_DATA_HOME/amp/threads (default ~/.local/share/amp/threads) not yet
Qwen CLI JSONL ~/.qwen/projects not yet
Kimi wire JSONL ~/.kimi/sessions and ~/.kimi-code/sessions not yet
Cline task JSON VS Code and Cursor global storage for saoudrizwan.claude-dev not yet
RooCode task JSON VS Code and Cursor global storage for rooveterinaryinc.roo-cline not yet
KiloCode task JSON VS Code and Cursor global storage for kilocode.kilo-code not yet
Antigravity SQLite ~/.gemini/antigravity-cli/conversations checked
DeepSeek Harness JSONL + zstd $DSH_HOME/sessions or ~/.dsh/sessions not yet

In the Real logs column, checked means the adapter was compared with real logs from that tool; not yet means it is built from the tool’s upstream code and synthetic fixtures. If a report disagrees with your tool, open an issue with the llm-usage doctor --source <source> output; leave out log contents.

SQLite-backed sources use the built-in node:sqlite module, available in every supported runtime (Node.js 22.16+ or 24+).

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

Doctor lists the paths each source searched and whether its newest files contain readable usage, without 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 --source-dir form. Repeat either to scan several directories as one source:

Terminal window
llm-usage monthly --codex-dir /path/to/codex/sessions
llm-usage monthly --source-dir codex=/path/to/codex/sessions
llm-usage monthly --claude-dir /work/.claude/projects --claude-dir /home/me/.claude/projects

The per-source flags (--claude-dir, --codex-dir, --opencode-db, and so on) are left out of --help to keep it short; llm-usage <command> --help-all lists them. CLAUDE_CONFIG_DIR, CODEX_HOME, and GEMINI_CLI_HOME move the default locations the same way they do for each tool, as do XDG_DATA_HOME (amp, opencode, goose), GOOSE_PATH_ROOT, DSH_HOME, and COPILOT_OTEL_FILE_EXPORTER_PATH. On Windows, %APPDATA% decides where opencode, goose, and the VS Code extensions are found. Each source page lists its own.

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.