Commands overview
Every subcommand is listed here with a one-line summary. Click through for flags, examples, and the JSON shape.
Global flag: --color auto|always|never (respects NO_COLOR).
Reports span Claude Code, OpenAI Codex, GitHub Copilot (CLI and VS Code), Pi, and OpenClaw by default. Every report accepts the shared filter flags — --provider, --model, --since/--until, --on-disk-only. --project is a separate per-command filter (it has its own column in the matrix below).
Read-only reports
| Command | What it does |
|---|---|
summary | Dashboard — sessions, cost, top projects/tools, model mix. |
sessions | List sessions grouped by project (all providers). |
session | Drill into one session: spend, files, tools, PRs, turns. |
cost | Token usage and approximate cost per project (or per session). |
search | Full-text search across session messages (FTS5), with JSON hits. |
tools | Tool-usage frequency, optionally per session. |
models | Call counts, token usage, and cost per model. |
turns | Per-turn timing (avg / p50 / p95 / max). |
prs | Sessions linked to pull requests. |
files | Most frequently modified files across sessions. |
providers | Provider roots, sync status, retention, and parse diagnostics. |
timeline | Daily or weekly usage trend. |
budget | Monthly budget burn and projection. |
activity | Recent sessions, PRs, files, and slow projects. |
Flag support matrix
Not every report accepts every flag. Consult the per-command page for exact usage; the matrix below is the quick overview.
| Command | filters | --project | --limit | --json | --no-index |
|---|---|---|---|---|---|
summary | ✓ | — | — | ✓ | ✓ |
sessions | ✓ | ✓ | ✓ | ✓ | ✓ |
session | — | ✓ | — | ✓ | ✓ |
cost | ✓ | ✓ | ✓ | ✓ | ✓ |
search | ✓ | ✓ | ✓ | ✓ | ✓ |
tools | ✓ | ✓ | ✓ | ✓ | ✓ |
models | ✓ | ✓ | — | ✓ | — |
turns | ✓ | ✓ | ✓ | ✓ | — |
prs | ✓ | ✓ | ✓ | ✓ | — |
files | ✓ | ✓ | ✓ | ✓ | — |
providers | ✓ | — | — | ✓ | — |
timeline | ✓ | — | ✓ | ✓ | — |
budget | ✓ | — | — | ✓ | — |
activity | ✓ | — | ✓ | ✓ | — |
Notes:
- filters = the shared
--provider/--model/--since/--until/--on-disk-onlyset. searchsupports--json; case-sensitive queries still fall back to a file scan automatically.turns,prs,files, andmodelsderive their data from the index only — there's no file-scan fallback path, so--no-indexisn't accepted.summaryis a whole-index dashboard spanning all providers; the shared filters apply, but there is no row limit.summaryalso accepts--plan <api|flat-monthly:USD>to reframe the cost section for flat-fee subscribers. Seesummary.
Actions
| Command | What it does |
|---|---|
export | Dump a session transcript as Markdown or JSON. |
watch | Tail Claude Code's --debug-file log in real time. |
index | Manage the SQLite index — force sync or full rebuild. |
update | Self-update claudex, or print the right upgrade recipe for Nix / cargo / brew installs. |
completions | Generate shell completion scripts. |
skills | Generate or install the claudex agent skill for Claude Code, Codex, Pi, or OpenClaw. |
Conventions
- Project filter.
--project foomatches any session whose decoded project path containsfoo. Worktree sessions roll up to their parent project. - Session selector. Commands that take a session (currently
sessionandexport) match on session-ID prefix or project name. - Limit default. Most commands default to
--limit 20. Pass a higher number for more rows. - Thousands separators. Token counts and message counts render as
326,297. Costs render as$12,345.67, falling back to$0.0042for sub-cent values.