Skip to content

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).

Read-only reports

CommandWhat it does
summaryDashboard — sessions, cost, top projects/tools, model mix.
sessionsList sessions grouped by project.
sessionDrill into one session: spend, files, tools, PRs, turns.
costToken usage and approximate cost per project (or per session).
searchFull-text search across session messages (FTS5), with JSON hits.
toolsTool-usage frequency, optionally per session.
modelsCall counts, token usage, and cost per model.
turnsPer-turn timing (avg / p50 / p95 / max).
prsSessions linked to pull requests.
filesMost frequently modified files across sessions.

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--project--limit--json--no-index
summary
sessions
session
cost
search
tools
models
turns
prs
files

Notes:

  • search supports --json now; case-sensitive queries still fall back to a file scan automatically.
  • turns, prs, files, and models derive their data from the index only — there's no file-scan fallback path, so --no-index isn't accepted.
  • summary is a whole-tree dashboard; filtering by project or row limit doesn't apply.

Actions

CommandWhat it does
exportDump a session transcript as Markdown or JSON.
watchTail Claude Code's --debug-file log in real time.
indexManage the SQLite index — force sync or full rebuild.
updateSelf-update claudex, or print the right upgrade recipe for Nix / cargo / brew installs.
completionsGenerate shell completion scripts.

Conventions

  • Project filter. --project foo matches any session whose decoded project path contains foo. Worktree sessions roll up to their parent project.
  • Session selector. Commands that take a session (currently session and export) 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.0042 for sub-cent values.

Quick alphabetical index

Released under the MIT License.