A beautiful, feature-rich web interface for viewing and auditing Claude Code conversation logs. Transform your raw JSONL log files into an intuitive, searchable, and visually appealing conversation browser.
You can install this locally:
cargo install cc-log-viewer
and then use it
cc-log-viewer
- Modern Design: Clean, responsive web interface with intuitive navigation
- Smart Layout: Human messages on right, AI on left for natural conversation flow
- Message Avatars: Clear visual distinction between users and AI
- Timestamps: Detailed timing information for every interaction
The log viewer includes specialized handlers for all major Claude Code tools:
- π TodoWrite: Renders todo lists with status indicators, priorities, and progress tracking
- π» Bash: Shows commands with
$prefix, descriptions, and formatted output - π Read: Displays file paths with line ranges and syntax-highlighted content
- βοΈ Edit: Visual diff view with red/green highlighting for changes
- π MultiEdit: Multiple file edits in organized cards with numbered changes
- π LS: Directory listings with proper formatting
- π Grep: Search patterns with highlighted results
- ποΈ Glob: File pattern matching with smart file type icons
- π― Task: Structured task display with descriptions and instructions
- π WebFetch: Clickable URLs with analysis prompts
- π§ Private Journal: Color-coded sections for feelings, insights, and context
- π Social Media: Login status and post creation with hashtag rendering
- Image Rendering: Inline image display with click-to-expand functionality
- Mixed Content: Seamless handling of text and images in conversations
- Base64 Decoding: Automatic conversion of encoded images
- Project Browser: Overview of all your Claude Code projects
- Session Management: Easy navigation between conversation sessions
- Activity Tracking: Last activity timestamps and session counts
- Smart URLs: Bookmarkable links to specific projects and sessions
- Rust (latest stable version)
- Claude Code installed and configured
-
Clone the repository:
git clone https://github.com/your-repo/cc-log-viewer.git cd cc-log-viewer -
Build the project:
cargo build --release
-
Run the viewer:
cargo run
Or with custom options:
# Custom port cargo run -- --port 3000 # Custom projects directory cargo run -- /path/to/your/claude/projects # Both options cargo run -- --port 3000 /path/to/your/claude/projects
-
Open your browser: Navigate to
http://localhost:2006(or your custom port)
- Projects View: Start by selecting a project from the main page
- Sessions View: Browse conversation sessions within a project
- Conversation View: Dive into detailed conversation logs
cc-log-viewer [OPTIONS] [PROJECTS_DIR]
Arguments:
[PROJECTS_DIR] Path to projects directory containing log files
(defaults to ~/.claude/projects/)
Options:
-p, --port <PORT> Port to serve on [default: 2006]
-h, --help Print help informationThe viewer automatically looks for Claude Code logs in:
~/.claude/projects/(default)- Each project should contain
.jsonlfiles representing conversation sessions
The log viewer features a sophisticated tool handler system that provides specialized rendering for different tool types:
// Base handler provides common functionality
class ToolHandler {
renderToolCall(toolCall) // Renders tool input
renderToolResult(result) // Renders tool output
renderInput(input) // Custom input formatting
renderOutput(result) // Custom output formatting
}
// Specialized handlers extend base functionality
class BashHandler extends ToolHandler {
// Custom bash command rendering with $ prefix
}- Consistent Icons: Each tool type has a unique emoji identifier
- Color Coding: Different tools use distinct color schemes
- Contextual Formatting: Input/output styled appropriately for tool type
- Responsive Design: All handlers work across device sizes
| Tool | Icon | Description | Special Features |
|---|---|---|---|
| TodoWrite | π | Task management | Status indicators, priority colors |
| Bash | π» | Shell commands | Command highlighting, monospace output |
| Read | π | File reading | Line numbers, syntax awareness |
| Edit | βοΈ | File editing | Diff visualization, change highlighting |
| MultiEdit | π | Multiple edits | Numbered changes, scrollable diffs |
| Glob | ποΈ | File patterns | File type icons, smart grouping |
| Task | π― | Agent tasks | Structured prompts, result formatting |
| WebFetch | π | Web requests | Clickable URLs, analysis display |
| Journal | π§ | Private notes | Color-coded sections, organized layout |
The viewer properly associates tool results with their corresponding tool calls, fixing the common issue where tool outputs appear as user messages.
All JSON content is automatically formatted with proper indentation and syntax highlighting.
- Base64 image decoding and display
- Click-to-expand functionality
- Support for multiple image formats
- Inline rendering within conversation flow
- Mobile-friendly interface
- Adaptive layouts for different screen sizes
- Touch-friendly navigation
cc-log-viewer/
βββ src/
β βββ main.rs # Rust backend server
βββ static/
β βββ index.html # Frontend web interface
βββ Cargo.toml # Rust dependencies
βββ README.md # This file
# Development build
cargo build
# Release build (optimized)
cargo build --release
# Run with hot reload during development
cargo run
# Run tests
cargo test
# Generate coverage report
cargo tarpaulin --out html --output-dir coverage
# Check code quality
cargo clippyThe project maintains high code quality standards:
- Clippy Clean: Zero warnings from Rust's linter
- Modern Rust: Uses latest stable Rust features
- Error Handling: Comprehensive error handling throughout
- Documentation: Inline code documentation
-
Create a new handler class:
class MyToolHandler extends ToolHandler { constructor() { super('MyTool'); } renderInput(input) { // Custom input rendering } renderOutput(result, toolCall) { // Custom output rendering } getIcon() { return 'π₯'; // Your tool's emoji } }
-
Register the handler:
const toolHandlers = { // ... existing handlers 'MyTool': new MyToolHandler() };
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run quality checks:
cargo clippy # Check for warnings cargo test # Run tests cargo build # Ensure it builds
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow Rust conventions and idioms
- Maintain clippy-clean code (zero warnings)
- Add tests for new functionality
- Update documentation for user-facing changes
- Use semantic commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
- Built for the Claude Code community
- Inspired by the need for better log visualization tools
- Uses modern web technologies for optimal user experience
Found a bug or have a feature request? Please:
- Check existing Issues
- Create a new issue with detailed information
- Include your system information and steps to reproduce
Future improvements planned:
- Search and filtering capabilities
- Export functionality (PDF, HTML)
- Advanced analytics and insights
- Plugin system for custom tool handlers
- Dark mode support
- Real-time log monitoring
Made with β€οΈ for the Claude Code community