Browse, search, and explore your Claude Code conversation history. A fast, self-hosted web interface powered by SQLite with full-text search.
Warning
Claude Code deletes conversations older than 30 days by default. Before using this tool, increase your retention period or you may have already lost history.
Claude Code stores all your conversations locally in ~/.claude/projects/ as JSONL files, but there's no built-in way to browse or search them. This tool gives you:
- Full-text search across all your conversations
- Project organization - see conversations grouped by project
- Real-time updates - new messages appear instantly via WebSocket
- Token tracking - monitor your usage patterns
- Mobile-friendly - works on desktop and mobile browsers
# Clone the repository
git clone https://github.com/drewburchfield/claude-code-chat-explorer.git
cd claude-code-chat-explorer
# Start the container
./quick-start.shOpen http://localhost:9876 in your browser.
- Project view - Conversations organized by project directory
- Full-text search - Fast FTS5-powered search with highlighted snippets
- Session details - See token counts, models used, and activity timelines
- Full message history - User and assistant messages with timestamps
- Tool calls - Expandable view of tool usage with parameters and results
- In-conversation search - Find specific content within long conversations
- Export - Download conversations as JSON
- Live updates - New conversations and messages appear instantly
- Activity indicators - See which sessions are active
- Subagent tracking - View spawned Task tool agents grouped under parents
- Docker and Docker Compose
- Claude Code installed (with conversations in
~/.claude)
- Scans your
~/.claude/projects/directory for conversation files - Indexes conversations into a SQLite database with full-text search
- Watches for changes and updates the index incrementally
- Serves a web interface on port 9876
The database and all processing happens locally. Your conversations never leave your machine.
claude-code-chat-explorer/
├── Dockerfile # Multi-stage Alpine build
├── docker-compose.yml # Container configuration
├── quick-start.sh # Startup script
├── package.json # Dependencies
├── src/
│ ├── chats-mobile.js # Express server
│ ├── analytics/
│ │ ├── core/ # Conversation parsing
│ │ └── data/ # SQLite + FTS5 layer
│ └── analytics-web/
│ └── chats_mobile.html # Web UI
└── test/ # Vitest test suite
Claude Code deletes conversations older than 30 days by default. If you want to preserve your history for this tool to browse, you need to increase the retention period.
Edit ~/.claude/settings.json and add or modify the cleanupPeriodDays setting:
{
"cleanupPeriodDays": 99999
}| Value | Behavior |
|---|---|
99999 |
Effectively infinite (recommended) |
365 |
Keep conversations for 1 year |
30 |
Default - deletes sessions inactive for 30+ days |
Note: Cleanup happens when you start a new Claude Code session, not continuously. If you've already lost history, it cannot be recovered.
If the file doesn't exist, create it:
echo '{"cleanupPeriodDays": 99999}' > ~/.claude/settings.json| Variable | Default | Description |
|---|---|---|
CLAUDE_HOME |
~/.claude |
Claude Code data directory |
CLAUDE_DB_PATH |
/data/conversations.db |
Database location |
Edit docker-compose.yml:
ports:
- "9877:9876" # Use port 9877 instead# View logs
docker compose logs -f
# Stop
docker compose down
# Restart
docker compose restart
# Rebuild after updates
docker compose up -d --build
# Reset database (re-indexes everything)
docker compose down -v
docker compose up -d --buildThe container runs hardened:
- Non-root user
- Read-only filesystem
- Dropped capabilities
- Memory limits (1GB)
- Localhost-only port binding
Your Claude data is mounted read-only.
Check that Claude Code has conversations:
find ~/.claude/projects -name "*.jsonl" | head -5Check logs:
docker compose logs --tail=50Change the port in docker-compose.yml and restart.
npm install
npm test # Run tests
npm run test:coverage # With coverage
npm run test:watch # Watch modeMIT
