Skip to content

claudexQuery your Claude Code sessions

A Rust CLI that indexes every JSONL transcript Claude Code writes under ~/.claude/projects/ and turns them into reports — cost, tools, turns, PRs, full-text search, and more.

At a glance

$ claudex summary

# Top 5 projects by cost, last 30 days
$ claudex cost --limit 5

# Which files get touched most across all my projects?
$ claudex files --limit 10

# Find every session where I discussed "migrations"
$ claudex search migrations

# Export one session as Markdown
$ claudex export <session-prefix> --output session.md

Install

bash
# With Cargo
cargo install --git https://github.com/utensils/claudex

# Or with Nix flakes
nix run github:utensils/claudex -- summary

# Or from a local checkout
git clone https://github.com/utensils/claudex
cd claudex && nix develop && cargo build --release

See the full installation guide for Nix, devshell, and shell-completion setup.

Why claudex?

Claude Code persists every conversation as JSONL under ~/.claude/projects/<encoded-path>/<session>.jsonl. That's a gold mine — it records every user turn, every assistant message, every tool call, every token-usage block, every file modification — but those files are flat logs, not a queryable store.

claudex reads them once, indexes the parts you actually want to ask questions about, and gives you a CLI that answers questions like:

  • Which project burned the most Opus tokens last week?
  • What's my p95 turn duration in this repo?
  • Show me every session that linked a PR.
  • Full-text search: where did I first discuss the schema migration?
  • How many times have I edited src/index.rs across sessions?

No cloud. No daemon. No background service. Just a small Rust binary and a SQLite file under ~/.claudex/.

Next steps

Released under the MIT License.