Skip to main content

Beautiful web viewer for AI conversation history (Claude, Qwen, and more)

Project description

AI Conversation Viewer ๐Ÿ”

A beautiful, unified web interface for browsing and searching your AI conversation history across multiple platforms.

Version Python License

โœจ Features

  • ๐Ÿค– Multi-IDE Sources โ€” Claude, Qwen, and Cursor/Trae/Kiro views with quick switcher
  • ๐Ÿ”Ž Global & Scoped Search โ€” Search across all IDEs or within a session, with term highlighting
  • ๐Ÿ“ Project & Session Browsing โ€” Grouped by date with activity timeline and rich metadata
  • ๐Ÿ’ป Markdown + Code Highlight โ€” Pygments-driven fenced code rendering and inline code styling
  • ๐Ÿงฉ Tool Use Visualization โ€” Structured tool calls rendered with readable params and outputs
  • ๐Ÿงพ Diff Viewer for Edits โ€” Inline unified diff for Edit tool results with added/removed lines
  • ๐ŸŽ›๏ธ Filters & Pagination โ€” Filter by role (User/Assistant/Summary), page size, and paginate large threads
  • ๐ŸŽจ Modern UX โ€” Dark/light theme toggle, responsive layout, copy buttons on code blocks
  • ๐ŸŒ Internationalization โ€” Language switcher (English/ไธญๆ–‡) with consistent UI labels
  • ๐Ÿ“ˆ Dashboard & Stats โ€” Global statistics cards and recent sessions across all sources

Feature Details

  • Multi-IDE support

    • Toggle views for Claude/Qwen/Cursor/Trae/Kiro directly from the header
    • Default data paths are auto-detected; override via environment variables:
      • CLAUDE_PROJECTS_PATH, QWEN_PROJECTS_PATH, CURSOR_WORKSPACE_STORAGE_PATH, TRAE_WORKSPACE_STORAGE_PATH, KIRO_WORKSPACE_STORAGE_PATH
  • Project and session browsing

    • Projects listed with session counts, modified time, and display names derived from workspace metadata
    • Sessions show message count, size, modified time, and extracted title; timeline view for recent activity
  • Conversation viewer

    • Markdown rendering with syntax highlighting for fenced blocks and inline code
    • Search within a conversation with keyword highlighting; filter by user/assistant/summary
    • Large results are paginated with quick controls; long tool outputs are safely truncated when needed
    • Tool calls are rendered in human-friendly format, including parameters and results
    • Edit tool results include an inline unified diff with line numbers and add/remove markers
  • Global dashboard and search

    • Global search across all IDEs with previews and quick navigation to sessions
    • Statistics cards per IDE: project/session counts and availability, plus recent sessions listing
  • Internationalization and theming

    • Language toggle via cookie; fully localized UI labels in English/Chinese
    • Theme toggle with persisted dark/light mode; mobile-responsive layout
  • Health and diagnostics

    • /health endpoint surfaces counts and paths for each IDE store to aid setup and troubleshooting

Favorites & Annotations

  • Save sessions and individual messages to a persistent favorites store
    • Click the star button on a session header or per-message row to add to favorites
    • Open the Favorites page from the header to browse, filter, edit, and remove
  • Storage
    • Persisted in SQLite at ~/.aicode-viewer/favorites.db
    • Includes tags, annotation text, and lightweight content preview
  • Filters and stats
    • Filter favorites by type (session/message), IDE view, tag, and text search
    • Favorites statistics: totals by type and IDE, plus top tags

Implementation references

  • Favorites DB: claude_viewer/db/favorites_db.py
  • Favorites UI: claude_viewer/templates/favorites.html, conversation star buttons in claude_viewer/templates/conversation.html

๐Ÿš€ Quick Start

Installation

pip install ai-coder-viewer

Usage

# Start with default settings (looks for ~/.claude/projects)
aicode-viewer

# Custom Claude projects path
aicode-viewer --projects-path /path/to/your/claude/projects

# Custom port
aicode-viewer --port 8080

# Accessible from other machines
aicode-viewer --host 0.0.0.0 --port 3000

Then open your browser to: http://localhost:6300

โšก Performance Optimization

The system includes built-in performance optimizations for faster response times:

Features

  • Memory Caching: Multi-level cache system (LRU + TTL) for projects, sessions, and conversations
  • Database Optimization: SQLite with WAL mode, 64MB cache, and 9 optimized indexes
  • Smart Caching: Automatic cache expiration with configurable TTL
  • Cache Management: API endpoints for monitoring and clearing cache

Performance Improvements

  • 10x faster project list loading (~500ms โ†’ ~50ms)
  • 10x faster session list loading (~300ms โ†’ ~30ms)
  • 10x faster conversation loading (~800ms โ†’ ~80ms)
  • 10x faster search operations (~1000ms โ†’ ~100ms)

Cache Management

# View cache statistics
curl http://localhost:6300/api/cache/stats

# Clear all caches
curl -X POST http://localhost:6300/api/cache/clear?cache_type=all

# Clear specific cache
curl -X POST http://localhost:6300/api/cache/clear?cache_type=projects

Performance Testing

# Install test dependencies
pip install tabulate

# Run performance tests
python test_performance.py

For detailed information, see:

๐Ÿ“ธ Screenshots

Main Dashboard - Multi-IDE Navigation

Browse and navigate across multiple AI platforms including Claude, Qwen, Cursor, Trae, and Kiro. Real-time viewing of conversation history from all supported IDEs with quick platform switcher.

Main Dashboard

Claude Conversation Viewer

Real-time conversation viewing with syntax highlighting, markdown rendering, and tool use visualization. View detailed conversation history with proper formatting and code highlighting.

Claude View

Global Search Interface

Powerful search functionality across all conversations and platforms. Search globally with instant results and quick navigation to any session.

Search Page

Search Results Detail

Detailed search results with context highlighting and preview. Navigate through search results efficiently with keyword highlighting.

Search Detail

Favorites Management

Save and manage your favorite conversations and messages. Organize with tags, add annotations, and filter by IDE platform or type.

Favorites

X-IDE Mode

Advanced X-IDE mode with powerful features for enhanced productivity. Experience the next level of AI conversation management.

X-IDE Mode

๐Ÿ› ๏ธ Command Line Options

aicode-viewer --help

Available options:

  • --projects-path - Path to Claude projects directory (default: ~/.claude/projects)
  • --host - Host to bind the server (default: 127.0.0.1)
  • --port - Port to run on (default: 6300)
  • --version - Show version information

๐Ÿ“ How It Works

AI conversation platforms store conversation history in JSONL files. This tool:

  1. Scans your AI projects directory (Claude: ~/.claude/projects/, Qwen: local storage)
  2. Parses JSONL conversation files from multiple AI platforms
  3. Presents them in a unified, beautiful web interface
  4. Enables powerful search and filtering across all conversations
  5. Supports multi-language UI for international users

๐Ÿ”ง Development

Local Development

git clone https://github.com/lohasle/AI-Conversation-Viewer
cd AI-Conversation-Viewer
pip install -e .
aicode-viewer

Run with reload

uvicorn claude_viewer.main:app --reload --host 127.0.0.1 --port 6300

Configure data paths

  • CLAUDE_PROJECTS_PATH โ€” Claude project directory
  • QWEN_PROJECTS_PATH โ€” Qwen storage directory
  • CURSOR_WORKSPACE_STORAGE_PATH โ€” Cursor workspace storage
  • TRAE_WORKSPACE_STORAGE_PATH โ€” Trae workspace storage
  • KIRO_WORKSPACE_STORAGE_PATH โ€” Kiro workspace storage

Example:

export CLAUDE_PROJECTS_PATH=~/.claude/projects
export QWEN_PROJECTS_PATH=~/.qwen/tmp
aicode-viewer --port 6300

Develop without install

python -m uvicorn claude_viewer.main:app --reload

Project Structure

claude-code-viewer/
โ”œโ”€โ”€ claude_viewer/                 # Python package
โ”‚   โ”œโ”€โ”€ main.py                    # FastAPI application
โ”‚   โ”œโ”€โ”€ cli.py                     # Command line interface
โ”‚   โ”œโ”€โ”€ i18n.py                    # UI translations
โ”‚   โ”œโ”€โ”€ db/                        # Favorites SQLite (CRUD, tags, stats)
โ”‚   โ”œโ”€โ”€ utils/                     # Parsers and helpers (Claude/Qwen/etc.)
โ”‚   โ”œโ”€โ”€ templates/                 # Jinja2 templates (dashboard, project, conversation, favorites)
โ”‚   โ””โ”€โ”€ static/                    # Frontend assets (CSS/JS)
โ”œโ”€โ”€ img/                           # Screenshots used in README
โ”œโ”€โ”€ pyproject.toml                 # Packaging metadata (preferred)
โ”œโ”€โ”€ setup.py                       # Legacy packaging metadata
โ”œโ”€โ”€ MANIFEST.in                    # Package data inclusion rules
โ”œโ”€โ”€ LICENSE                        # Apache 2.0 license
โ”œโ”€โ”€ README.md / README_CN.md       # Documentation (English/Chinese)
โ”œโ”€โ”€ QWEN.md                        # Qwen-specific notes
โ”œโ”€โ”€ build_and_upload.sh            # Publishing helper script
โ””โ”€โ”€ .github/workflows/ci.yml       # CI pipeline

๐Ÿค Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

git clone <your-fork>
cd claude-code-viewer
pip install -e ".[dev]"

๐Ÿค– Supported AI Platforms

Currently supports:

  • Claude Code โ€” Anthropic's official CLI for Claude
  • Qwen (้€šไน‰ๅƒ้—ฎ) โ€” Alibaba Cloud's AI assistant
  • Cursor โ€” AI coding IDE workspace sessions
  • Trae โ€” AI coding IDE workspace sessions
  • Kiro โ€” AI coding IDE workspace sessions

More platforms coming soon!

๐Ÿ“‹ Requirements

  • Python 3.8+
  • AI Platform (Claude Code, Qwen, or other supported platforms)
  • Modern web browser (Chrome, Firefox, Safari, Edge)

๐Ÿ› Troubleshooting

"Projects path does not exist"

Make sure Claude Code has been used and has created conversation files. The default path is ~/.claude/projects.

"No JSONL files found"

Ensure you have used Claude Code and it has generated conversation history. Try specifying a custom path with --projects-path.

Port already in use

Use a different port: aicode-viewer --port 8080

๐Ÿ“„ License

Apache 2.0 License - see LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“Š Highlights

  • ๐ŸŽฏ Zero configuration - Works out of the box for most users
  • โšก Fast startup - Sub-second launch time
  • ๐Ÿ” Full-text search - Search across all conversations instantly
  • ๐Ÿ“ฑ Mobile responsive - Works seamlessly on all devices
  • ๐ŸŒ Multi-language - English and Chinese UI support
  • ๐Ÿค– Multi-platform - Support for multiple AI platforms

๐Ÿ—บ๏ธ Roadmap

  • Support for more AI platforms (Gemini, etc.)
  • Export conversations to various formats (PDF, Markdown, HTML)
  • Advanced filtering and tagging system
  • Conversation analytics and statistics
  • Real-time conversation monitoring
  • Continue conversations directly via Web interface
  • UI overhaul with IM-style messaging interface

Made with โค๏ธ for the AI development community

Report Issues โ€ข Feature Requests โ€ข ไธญๆ–‡ๆ–‡ๆกฃ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_coder_viewer-1.1.4.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_coder_viewer-1.1.4-py3-none-any.whl (103.5 kB view details)

Uploaded Python 3

File details

Details for the file ai_coder_viewer-1.1.4.tar.gz.

File metadata

  • Download URL: ai_coder_viewer-1.1.4.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for ai_coder_viewer-1.1.4.tar.gz
Algorithm Hash digest
SHA256 f4e876583548a995cc56cc18191566896ea974ce76bd12b765fbf8ee31a5fef1
MD5 3fc90b3c43dd50c35596dd6daaf03100
BLAKE2b-256 f5ec524854c524e538f94b8d267f4df2cf61c320a996e099edd185d3c769c285

See more details on using hashes here.

File details

Details for the file ai_coder_viewer-1.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_coder_viewer-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 510bd0f0adc3b3f3bf167c8afe50e9d6a9a263180ed3cbea97bc7737b1cb08f4
MD5 5a0afb95586b340e563b2f3d92226a86
BLAKE2b-256 58b305c4882e9d60a7c93f35a859f5c340488fa5fac1a36dc6c8ac53fb910abf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page