Skip to content

andyhtran/cct

Repository files navigation

cct — Search and browse your Claude Code sessions

Claude Code sessions are ephemeral. When you need context from yesterday's debugging session or last week's architecture decision, there's no easy way to find it. cct makes your session history searchable — for you and for Claude itself.

cct view and export

Requires Claude Code. macOS and Linux.

Install

brew install andyhtran/tap/cct
Build from source
git clone https://github.com/andyhtran/cct.git
cd cct && go build -o cct ./cmd/cct

Finding past sessions

Search across all your conversations:

cct search "database migration"       # Find sessions mentioning a topic
cct search "auth bug" -p backend      # Filter to a specific project

List recent sessions:

cct                     # Quick view: 5 most recent
cct list -p myproject   # Filter by project name
cct list -a             # Show all sessions

Getting full context

View a session in your terminal:

cct view <id>           # Interactive TUI viewer

Export to markdown:

cct export <id>         # Truncated output
cct export <id> --full  # Complete conversation

Why not claude --resume? There are known issues where resumed sessions don't load full context (#15837, #22107). Use cct view or cct export when you need the complete conversation.

Resuming work

cct resume <id>         # cd to project dir and run claude --resume

Use with Claude Code agents

Add to your CLAUDE.md to let Claude search your session history:

Use `cct search <query>` to find relevant past sessions.
Use `cct export <id> --full` to read full conversation context.

Then prompt naturally:

use cct to find sessions where we debugged the auth issue

This turns your session history into a searchable knowledge base that Claude can query.

Other commands

cct info <id>    # Session metadata: project, branch, timestamps
cct stats        # Usage statistics across all projects

Run cct --help for additional commands.

JSON output

All commands support --json for scripting:

cct search "bug" --json | jq -r '.[].session.short_id'

How it works

cct reads session data from ~/.claude/projects/ (JSONL files). All operations are read-only.

The Claude Code data format is undocumented and may change between versions.

License

MIT

About

Claude Code Tools: list, search, resume your Claude Code sessions from the terminal

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors