Skip to content

claudexQuery your AI coding sessions

A Rust CLI that indexes the local transcripts of Claude Code, OpenAI Codex, GitHub Copilot, Pi, and OpenClaw into one SQLite database and turns them into reports — cost, tools, turns, PRs, full-text search, and more, across every provider.

At a glance

$ claudex summary

# How much have I spent on Codex this month?
$ claudex cost --provider codex --since 30d

# Top 5 projects by cost across all providers
$ 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 claudex-cli

# 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 -p claudex-cli --bin claudex

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

Why claudex?

Claude Code, OpenAI Codex, GitHub Copilot, Pi, and OpenClaw each persist every conversation as local transcripts — every user turn, every assistant message, every tool call, every token-usage block, every file modification — but those files are flat logs in several different formats, not a queryable store.

claudex reads them once, normalizes them into one SQLite index, and gives you a CLI that answers questions like:

  • How much have I spent on Codex versus Claude this month?
  • 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?

The index is additive — sessions you archive or delete from disk stay in your history. 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.