Quickstart
This is the five-minute tour. It assumes you've installed claudex and run claude locally at least once so ~/.claude/projects/ has content.
1. See the dashboard
claudex summaryYou'll get one screenful: total sessions, today/this-week counts, cost totals, top projects, top tools, model distribution, and the most recent session.
First run indexes the whole ~/.claude/projects/ tree — the spinner shows progress on stderr. Subsequent runs reuse the index (5-minute staleness window), so they're near-instant.
2. Cost, by project
claudex cost --limit 10Aggregates token usage across every session in each project, applies the correct pricing tier per message (Opus / Sonnet / Haiku), and sorts by cost descending.
Add --per-session to break it out by individual session, or --project utensils to filter to projects whose decoded path contains utensils.
3. Full-text search
claudex search "schema migration"
claudex search serde --project claudex --limit 5Uses SQLite's FTS5 virtual table. Case-insensitive by default; pass --case-sensitive to drop back to a file scan (FTS5 doesn't support case-sensitive queries).
Each hit shows the project, session ID prefix, date, role, and the matching line with the query highlighted.
4. Tool and model usage
claudex tools --limit 15 # How often you reach for Bash, Edit, Read, ...
claudex models # Calls, token usage, cost per model5. Export a session
# Find a recent session and grab its prefix
claudex sessions --limit 5
# Export as Markdown (default)
claudex export e1a2f4 --output my-session.md
# Or as JSON
claudex export e1a2f4 --format json --output my-session.jsonThe selector matches by session-ID prefix or by project name (substring). Combine --project for disambiguation when a short prefix is ambiguous.
Bonus: pipe to jq
Every report supports --json:
# Top three cost projects, numeric only
claudex cost --json --limit 3 \
| jq '.[] | {project, cost_usd}'
# p95 turn duration for one project
claudex turns --project claudex --json \
| jq '.[0].p95_duration_ms'Bonus: live tail
When you want structured output from a running Claude Code session:
# In one shell
claudex watch
# In another shell
claude --debug-file ~/.claudex/debug/latest.logclaudex watches the debug log, formats tool calls, and inserts a banner every time claude starts a new session (which truncates the log).
See Watch mode for details.
Where next?
- The index — when it syncs, when to force a rebuild.
- Commands overview — every subcommand.
- Recipes — one-liners for common questions.