A terminal UI application that scans local Claude Code and OpenCode conversation histories, displaying them in an interactive interface for browsing and analyzing conversations.
- Split-pane interface: Conversation list on top, detailed message view on bottom
- Multi-source support: Scans both Claude Code and OpenCode conversation histories
- Chronological organization: Conversations sorted by last modified date
- Message analysis: Stacked bar visualization showing message timeline with color-coded types
- Individual message browsing: Navigate through messages with syntax highlighting and expansion
- Text wrapping: Long messages wrap properly in expanded view
- Real-time filtering: Press
/to filter conversations by project name or session ID - Token estimation: Shows estimated token counts alongside character counts
- Export functionality: Export conversations to Claude Code (.jsonl) or OpenCode (multi-file) format
- Keyboard-driven: Full keyboard navigation with intuitive shortcuts
- Message editing: Delete messages with 'd' key (be careful!)
- Caching: Intelligent caching system to avoid re-parsing unchanged files
- Bun runtime (required for native FFI and OpenTUI)
- Node.js for TypeScript types
# Install dependencies
bun install
# Run directly from source
bun index.ts
# Or build and run
bun run build
bun run start
# Or use the npm script
bun run convx# Use default locations
bun index.ts
# Show help
bun index.ts --help
# Custom data locations
bun index.ts --claude-root ~/custom/claude/path --opencode-root ~/custom/opencode/path
# Size calculation modes
bun index.ts --size-mode tokens # Use token estimates instead of character count
# Filter by date
bun index.ts --since 2025-01-01 # Only show sessions from 2025
# Enable debug overlay
bun index.ts --debug↑/↓orj/k- Navigate conversation listEnter- Select conversation to view messagesEsc- Clear selection highlightingHome/End- Jump to first/last conversation
↑/↓orj/k- Navigate messages (when focused)Enter- Expand/collapse selected message for full contentd- Delete selected message (permanent!)Home/End- Jump to first/last messagePage Up/Down- Scroll through messages or expanded content
Tab- Toggle focus between conversation list and message list/- Enter filter mode to search conversationse- Export selected conversation to Claude Code or OpenCode formatEsc- Exit filter mode or clear selectionr- Refresh data (re-scan filesystem)qorCtrl+C- Exit application
The application automatically scans:
Claude Code: ~/.claude/projects/**/*.{json,jsonl,ndjson,log}
- Supports both NDJSON streams and JSON arrays
- Extracts session ID, timestamps, project info from conversation logs
OpenCode: ~/.local/share/opencode/project/**/storage/session/
- Reads session metadata from
info/ses_*.jsonfiles - Parses messages from
message/ses_*/msg_*.jsonfiles
Messages are automatically classified into types with color coding:
- U (User) - User input messages (yellow)
- A (Assistant) - Assistant text responses (green)
- T (Tool Call) - Assistant responses with tool calls (blue)
- R (Tool Result) - Tool execution results (pink/red)
In the message list, each message shows a colored letter indicator followed by token count and content preview. Use Enter to expand messages for full content with proper text wrapping.
The application can export conversations to different formats:
- Select a conversation in the conversation list
- Press
eto open the export dialog - Choose format:
- Claude Code: Exports as a single JSONL file in the Claude Code projects directory
- OpenCode: Exports as multi-file structure in the OpenCode project directory
- Press Enter to export
Export creates files with proper structure:
- Claude Code:
{sessionId}.jsonlwith one JSON object per line - OpenCode: Complete directory structure with session info, message files, and part files
--size-mode chars(default): UTF-16 character count--size-mode bytes: Byte count (UTF-8 encoded)--size-mode tokens: Rough token estimate (~4 chars per token)
The application is built with:
- @opentui/core: Terminal UI framework with native rendering
- Data layer: File system scanners for Claude Code and OpenCode formats
- State management: Centralized store for UI state and data
- Component system: Custom renderables extending OpenTUI base classes
- Caching: Content-based caching to avoid re-parsing unchanged files
# Run in development mode
bun run dev
# Build for distribution
bun run build
# The built executable will be in dist/index.js- "This application requires Bun runtime": Install Bun from https://bun.sh
- No data found: Check that Claude Code/OpenCode have created conversation files in the expected locations
- Import errors: Ensure you're running with
bunnotnode - Permission errors: Check file permissions in the conversation data directories
The codebase is organized into:
src/data/- File parsing and data processingsrc/ui/- Custom OpenTUI renderable componentssrc/state/- Application state managementsrc/App.ts- Main application logic and layoutsrc/index.ts- CLI entry point and argument parsing