Search everything you've ever done in Claude Code.

ccx indexes every transcript in ~/.claude/projects: your prompts, the replies, every tool call and what it returned. Find the command from three weeks ago in milliseconds, then jump straight back into that session.

$ git clone https://github.com/luquitared/ccx && cd ccx && bun link && ccx index
Needs Bun ≥ 1.1. Zero dependencies. Nothing leaves your machine.
$ ccx search "nginx reload" -t Bash
 1. infra · Sep 28 14:02 · Fix TLS renewal
    sudo systemctl reload nginx
    ↳ ccx show 3f9a12c0 --line 214
 2. blog · Sep 3 09:41 · Move to new VPS
    rsync -a conf/ vps:/etc/nginx/
    ↳ ccx show 81c07e5d --line 977

$ ccx resume 3f9a12c0
cd ~/code/infra && claude -r 3f9a…

Claude Code keeps everything. It just can't find it.

Every session is saved as JSONL on your disk, often gigabytes of it. ccx turns that pile into a SQLite full-text index you can query like grep, only ranked and fast.

All of itNot just the chat

Prompts, replies, thinking, tool calls with their inputs, tool results, summaries, titles, and subagent transcripts.

FastMilliseconds, ranked

SQLite FTS5 with BM25 ranking. Re-indexing only touches changed files, so it's sub-second when nothing's new.

CleanNoise filtered out

Injected reminders, hook output and resume replays are skipped, and every entry is indexed exactly once.

Agent-readyJSON everywhere

--json on search, show and sessions, so a Claude session can search its own past and read just the ~10 blocks it needs.

Five commands

Filter by project, time window, tool or block kind. Every hit prints the command to open it.

ccx search "rate limit" -p my-api -s 2wRanked hits from one project in the last two weeks
ccx search "presigned url" -t BashOnly Bash tool calls
ccx show 3f9a12c0 --line 214 -C 8The conversation around a hit, rendered
ccx sessions -p my-api -s 1mSessions, newest first, with titles
ccx resume 3f9a12c0Prints the cd … && claude -r line to pick it back up
search→show→resume

Long-term memory for Claude

Claude starts every session with an empty head. Give it ccx and it can look up what you did last week the same way you would: search, read the few blocks that matter, carry on. Just say "use ccx".

You
Use ccx to find the session where we moved the blog to the new VPS. The DNS records are gone from the old registrar, what did we have?
Claude
$ ccx index Indexed 3 changed file(s) of 2955 scanned (0.4s) $ ccx search "dns records" -p blog -t Bash --json -n 5 → 2 hits · blog · Sep 3 · "Move to new VPS" $ ccx show 81c07e5d --line 412 -C 6 --json → 13 blocks: the dig output from before the move, then the new A record
Claude
Found it: Sep 3, "Move to new VPS". Before the move you had an A record for the apex, a CNAME for www, two MX records for your mail host and a TXT record for SPF. We only re-created the A record afterwards, which is why mail stopped. Want me to add the other four back?

Things people ask

Each one turns into a search or two and a show of the right slice. Claude never has to read a whole transcript.

"Find the session where I fine-tuned the model with LoRA. Which learning rate did we land on?"ccx search "lora learning rate" -k assistant ccx show <id> --line <n> -C 10

Recover a decision and the reasoning behind it.

"Pull up the convo where we set up the agent on the remote machine and pick up where it left off."ccx sessions -q "remote machine" --json ccx show <id> --tail 30 --json

Re-load a stalled task's last state into a fresh session.

"How did we get that CLI to authenticate last month? Do it the same way."ccx search "cookies auth" -t Bash -s 2m

Re-use a command that worked, instead of rediscovering it.

"We found a bug in #337 recently. Was it actually intentional?"ccx search "337" -s 2w --main ccx show <id> --line <n> -C 12

Check what was known before changing behavior.

"Look at the briefings you've written me before and design a better one."ccx sessions -q briefing --json ccx show <id> --tail 20 --json

Learn from its own past output.

"Go through my last three months of sessions. What have I built that I could turn into X? Rank them."ccx sessions -s 3m -n 200 --json ccx search "<theme>" --json -n 30

Mine your whole history for patterns.

Make it automatic

Paste this into ~/.claude/CLAUDE.md and Claude reaches for ccx on its own whenever you mention an earlier conversation.

## Past conversations
`ccx` searches every past Claude Code session on this machine. When I refer to an
earlier conversation ("the session where…", "like last time", "we already fixed
this") or you need context you don't have:
1. Run `ccx index` (sub-second), then `ccx search "<terms>" --json -n 10`.
   Narrow with -p <project>, -s 2w, -k user, -t Bash, --main.
2. Read the best hits with `ccx show <session> --line <n> -C 10 --json`.
   Read slices, never whole transcripts.
3. Say what you found (date and session title), or that nothing matched.
If I want to jump back in, give me the `ccx resume <session>` line.