{"id":30727585,"url":"https://github.com/dnakov/convx","last_synced_at":"2025-09-03T14:07:38.046Z","repository":{"id":312365854,"uuid":"1042128910","full_name":"dnakov/convx","owner":"dnakov","description":"TUI conversation explorer for Claude Code \u0026 OpenCode","archived":false,"fork":false,"pushed_at":"2025-08-21T14:25:04.000Z","size":57,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-30T05:51:59.839Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnakov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-08-21T14:24:29.000Z","updated_at":"2025-08-25T17:07:58.000Z","dependencies_parsed_at":"2025-08-30T05:52:02.780Z","dependency_job_id":"812afce3-0580-41be-baf6-d6f9b5ca312b","html_url":"https://github.com/dnakov/convx","commit_stats":null,"previous_names":["dnakov/convx"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dnakov/convx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnakov%2Fconvx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnakov%2Fconvx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnakov%2Fconvx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnakov%2Fconvx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnakov","download_url":"https://codeload.github.com/dnakov/convx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnakov%2Fconvx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273453710,"owners_count":25108473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-03T14:07:36.067Z","updated_at":"2025-09-03T14:07:38.025Z","avatar_url":"https://github.com/dnakov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Conversation Explorer\n\nA terminal UI application that scans local Claude Code and OpenCode conversation histories, displaying them in an interactive interface for browsing and analyzing conversations.\n\n## Features\n\n- **Split-pane interface**: Conversation list on top, detailed message view on bottom\n- **Multi-source support**: Scans both Claude Code and OpenCode conversation histories  \n- **Chronological organization**: Conversations sorted by last modified date\n- **Message analysis**: Stacked bar visualization showing message timeline with color-coded types\n- **Individual message browsing**: Navigate through messages with syntax highlighting and expansion\n- **Text wrapping**: Long messages wrap properly in expanded view\n- **Real-time filtering**: Press `/` to filter conversations by project name or session ID\n- **Token estimation**: Shows estimated token counts alongside character counts\n- **Export functionality**: Export conversations to Claude Code (.jsonl) or OpenCode (multi-file) format\n- **Keyboard-driven**: Full keyboard navigation with intuitive shortcuts\n- **Message editing**: Delete messages with 'd' key (be careful!)\n- **Caching**: Intelligent caching system to avoid re-parsing unchanged files\n\n## Requirements\n\n- **Bun runtime** (required for native FFI and OpenTUI)\n- Node.js for TypeScript types\n\n## Installation\n\n```bash\n# Install dependencies\nbun install\n\n# Run directly from source\nbun index.ts\n\n# Or build and run  \nbun run build\nbun run start\n\n# Or use the npm script\nbun run convx\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\n# Use default locations\nbun index.ts\n\n# Show help\nbun index.ts --help\n\n# Custom data locations\nbun index.ts --claude-root ~/custom/claude/path --opencode-root ~/custom/opencode/path\n\n# Size calculation modes\nbun index.ts --size-mode tokens  # Use token estimates instead of character count\n\n# Filter by date\nbun index.ts --since 2025-01-01  # Only show sessions from 2025\n\n# Enable debug overlay\nbun index.ts --debug\n```\n\n### Keyboard Shortcuts\n\n#### Conversation List (Top Pane)\n- `↑/↓` or `j/k` - Navigate conversation list\n- `Enter` - Select conversation to view messages\n- `Esc` - Clear selection highlighting\n- `Home/End` - Jump to first/last conversation\n\n#### Message List (Bottom Pane)  \n- `↑/↓` or `j/k` - Navigate messages (when focused)\n- `Enter` - Expand/collapse selected message for full content\n- `d` - Delete selected message (permanent!)\n- `Home/End` - Jump to first/last message\n- `Page Up/Down` - Scroll through messages or expanded content\n\n#### Global Controls\n- `Tab` - Toggle focus between conversation list and message list\n- `/` - Enter filter mode to search conversations\n- `e` - Export selected conversation to Claude Code or OpenCode format\n- `Esc` - Exit filter mode or clear selection\n- `r` - Refresh data (re-scan filesystem)\n- `q` or `Ctrl+C` - Exit application\n\n### Data Sources\n\nThe application automatically scans:\n\n**Claude Code**: `~/.claude/projects/**/*.{json,jsonl,ndjson,log}`\n- Supports both NDJSON streams and JSON arrays\n- Extracts session ID, timestamps, project info from conversation logs\n\n**OpenCode**: `~/.local/share/opencode/project/**/storage/session/`\n- Reads session metadata from `info/ses_*.json` files  \n- Parses messages from `message/ses_*/msg_*.json` files\n\n### Message Classification\n\nMessages are automatically classified into types with color coding:\n\n- **U** (User) - User input messages (yellow)\n- **A** (Assistant) - Assistant text responses (green)  \n- **T** (Tool Call) - Assistant responses with tool calls (blue)\n- **R** (Tool Result) - Tool execution results (pink/red)\n\nIn 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.\n\n### Export Feature\n\nThe application can export conversations to different formats:\n\n1. **Select a conversation** in the conversation list\n2. **Press `e`** to open the export dialog\n3. **Choose format**:\n   - **Claude Code**: Exports as a single JSONL file in the Claude Code projects directory\n   - **OpenCode**: Exports as multi-file structure in the OpenCode project directory\n4. **Press Enter** to export\n\nExport creates files with proper structure:\n- **Claude Code**: `{sessionId}.jsonl` with one JSON object per line\n- **OpenCode**: Complete directory structure with session info, message files, and part files\n\n### Size Calculation\n\n- `--size-mode chars` (default): UTF-16 character count\n- `--size-mode bytes`: Byte count (UTF-8 encoded)\n- `--size-mode tokens`: Rough token estimate (~4 chars per token)\n\n## Architecture\n\nThe application is built with:\n\n- **@opentui/core**: Terminal UI framework with native rendering\n- **Data layer**: File system scanners for Claude Code and OpenCode formats\n- **State management**: Centralized store for UI state and data\n- **Component system**: Custom renderables extending OpenTUI base classes\n- **Caching**: Content-based caching to avoid re-parsing unchanged files\n\n## Development\n\n```bash\n# Run in development mode\nbun run dev\n\n# Build for distribution  \nbun run build\n\n# The built executable will be in dist/index.js\n```\n\n## Troubleshooting\n\n1. **\"This application requires Bun runtime\"**: Install Bun from https://bun.sh\n2. **No data found**: Check that Claude Code/OpenCode have created conversation files in the expected locations\n3. **Import errors**: Ensure you're running with `bun` not `node`\n4. **Permission errors**: Check file permissions in the conversation data directories\n\n## Contributing\n\nThe codebase is organized into:\n\n- `src/data/` - File parsing and data processing\n- `src/ui/` - Custom OpenTUI renderable components  \n- `src/state/` - Application state management\n- `src/App.ts` - Main application logic and layout\n- `src/index.ts` - CLI entry point and argument parsing","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnakov%2Fconvx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnakov%2Fconvx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnakov%2Fconvx/lists"}