Skip to content

GitJuhb/claude-conv-manager-clean

Repository files navigation

Claude Conversation Manager

A powerful, Rust-based tool for intelligently managing, analyzing, and enhancing your Claude conversations. This cross-platform application provides comprehensive conversation management with advanced analytics, configuration generation, and real-time search capabilities.

Features

🎯 Conversation Management

  • Smart Conversation Naming: Automatically generates descriptive names based on conversation content
  • Project Detection: Intelligently categorizes conversations by detecting programming languages and frameworks
  • Fast Search: Full-text search with Tantivy indexing for instant results
  • Conversation Categorization: Automatically categorizes as Debug, Feature, Config, Research, or Other
  • Cost Tracking: Monitor API usage costs with detailed breakdowns

📊 Analytics & Insights

  • Command Detection: Tracks slash commands and custom commands used in conversations
  • Framework Pattern Detection: Identifies React, Vue, Angular, Django, Flask, FastAPI, Rust, Go, Node.js usage
  • Usage Analytics: Visualize conversation frequency, tool usage, and cost analysis
  • Daily Activity Tracking: Monitor your Claude usage patterns over time
  • Project Analytics: Per-project insights and statistics

⚙️ Configuration Generation

  • Automatic CLAUDE.md Generation: Creates project-specific configuration files based on usage patterns
  • Template Suggestions: Recommends commands and agents based on your workflow
  • Framework-Specific Best Practices: Generates coding standards based on detected frameworks

🌐 Web Interface

  • Unified Dashboard: Single interface for conversations, analytics, and configuration
  • Dark Theme: Modern, eye-friendly dark-themed UI with responsive design
  • Real-time Updates: Live status indicators for backend services
  • Cross-platform Browser Support: Works on Windows, macOS, and Linux

Quick Start

Prerequisites

  • Rust (latest stable version) - Install from rustup.rs
  • Claude conversations stored locally (the tool will auto-detect common locations)

Automatic Setup

Linux/macOS

git clone https://github.com/yourusername/claude-conv-manager.git
cd claude-conv-manager
chmod +x setup.sh
./setup.sh

Windows (PowerShell)

git clone https://github.com/yourusername/claude-conv-manager.git
cd claude-conv-manager
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
.\setup.ps1

The setup script will:

  • Auto-detect your Claude conversation directories
  • Create configuration files
  • Build the application
  • Set up API keys (optional)
  • Create desktop shortcuts (Linux)

Manual Setup

If you prefer manual setup:

  1. Clone and Build

    git clone https://github.com/yourusername/claude-conv-manager.git
    cd claude-conv-manager
    cargo build --release
  2. Configure (create .env file)

    # Copy example configuration
    cp .env.example .env
    
    # Edit with your paths
    nano .env
  3. Index Conversations

    ./target/release/claude-conv-manager index
  4. Start Web Server

    ./target/release/claude-conv-manager serve

Configuration

The application supports multiple configuration methods:

Environment Variables (.env file)

# Directory containing Claude conversations
CLAUDE_CONV_DIR=/path/to/.claude/projects

# Metadata cache location
CLAUDE_METADATA_FILE=/path/to/.claude-conv-metadata.json

# Search index directory
CLAUDE_INDEX_DIR=/path/to/.claude-conv-tantivy-index

# Web server port
CLAUDE_SERVER_PORT=8080

# Optional API keys for enhanced features
ANTHROPIC_API_KEY=your_key_here
GROQ_API_KEY=your_key_here

TOML Configuration (config.toml)

conversations_dir = "/path/to/.claude/projects"
metadata_file = "/path/to/.claude-conv-metadata.json"
index_dir = "/path/to/.claude-conv-tantivy-index"
server_port = 8080
enable_terminal_integration = true

additional_search_paths = [
    "~/.claude/conversations/",
    "~/*/claude/",
    "~/*/.claude/"
]

Automatic Directory Detection

The application automatically discovers Claude conversations in:

  • ~/.claude/projects/
  • ~/.claude/conversations/
  • ~/.claude-instance-2/projects/
  • Project-specific .claude/ directories
  • Additional patterns defined in configuration

Usage

Command Line Interface

# Index all conversations
./target/release/claude-conv-manager index

# Start web server (default port 8080)
./target/release/claude-conv-manager serve

# Start on custom port
./target/release/claude-conv-manager serve --port 3000

# Search conversations
./target/release/claude-conv-manager search "rust programming" --limit 10

# View statistics
./target/release/claude-conv-manager stats

# Resume conversation (requires terminal integration)
./target/release/claude-conv-manager resume CONVERSATION_ID

Web Interface

Access the web dashboard at http://localhost:8080 (or your configured port) for:

  • Conversation Browser: Search, filter, and view all conversations
  • Analytics Dashboard: Usage statistics, cost tracking, and project insights
  • Configuration Generator: Create CLAUDE.md files based on your usage patterns
  • Real-time Search: Instant full-text search across all conversations

API Endpoints

The application provides a REST API for integration:

Conversations

  • GET /api/conversations - List all conversations with metadata
  • GET /api/conversation/:id - Get specific conversation details
  • GET /api/search?q=query&project=name - Search conversations
  • POST /api/rename/:id - Rename a conversation

Analytics

  • GET /api/stats - Overall statistics
  • GET /api/usage - Detailed usage statistics with cost analysis
  • GET /api/analytics - Comprehensive analytics data
  • GET /api/analytics/commands - Command usage insights

Projects & Configuration

  • GET /api/projects - List all detected projects
  • GET /api/config/suggest - Get configuration suggestions
  • GET /api/config/generate/:project - Generate CLAUDE.md for project

Platform-Specific Features

Linux

  • Desktop entry creation for application launcher
  • System notification support
  • Terminal integration with various terminal emulators

macOS

  • Dock integration
  • Native notifications
  • Terminal.app integration
  • Optimized for Apple Silicon and Intel Macs

Windows

  • Start Menu shortcuts
  • Windows Terminal integration
  • PowerShell completion scripts
  • Windows notification system

Advanced Features

AI-Powered Enhancements (Optional)

Enable advanced features by setting API keys:

  1. Anthropic API Key: Enables AI-powered conversation naming
  2. Groq API Key: Enables batch conversation summarization
# Set in .env file
ANTHROPIC_API_KEY=your_anthropic_key
GROQ_API_KEY=your_groq_key

# Or use setup script
./setup.sh  # Will prompt for API keys

Performance Optimization

For large conversation datasets:

# Force rebuild search index
./target/release/claude-conv-manager index --force

# Run with debug logging
RUST_LOG=debug ./target/release/claude-conv-manager serve

# Use release build for optimal performance
cargo build --release

Troubleshooting

Common Issues

No conversations found: Verify conversation directory path in configuration

# Check current configuration
cat .env

# Manual directory specification
CLAUDE_CONV_DIR=/custom/path ./target/release/claude-conv-manager serve

High CPU usage: Ensure you're using the release build

cargo build --release  # Not just 'cargo build'

Search not working: Rebuild the search index

./target/release/claude-conv-manager index --force

Port already in use: Change the port number

./target/release/claude-conv-manager serve --port 3001

Debug Mode

Enable detailed logging for troubleshooting:

RUST_LOG=debug ./target/release/claude-conv-manager serve

Development

Building from Source

# Clone repository
git clone https://github.com/yourusername/claude-conv-manager.git
cd claude-conv-manager

# Install dependencies and build
cargo build --release

# Run tests
cargo test

# Check code quality
cargo clippy
cargo fmt

Project Structure

claude-conv-manager/
├── src/
│   ├── main.rs              # CLI entry point
│   ├── config.rs            # Configuration management
│   ├── models.rs            # Data structures
│   ├── parser.rs            # JSONL parser
│   ├── analytics.rs         # Analytics engine
│   ├── tantivy_search.rs    # Search implementation
│   ├── simple_server.rs     # HTTP server
│   └── ...                  # Additional modules
├── setup.sh                 # Unix setup script
├── setup.ps1                # Windows setup script
├── .env.example             # Example environment config
├── config.toml.example      # Example TOML config
└── Cargo.toml              # Rust dependencies

Contributing

  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

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with Rust for performance and safety
  • Uses Tantivy for fast full-text search
  • Web interface built with vanilla HTML/CSS/JavaScript for maximum compatibility
  • Inspired by the Claude Code ecosystem and community feedback

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published