cc2report
Read this in other languages: 日本語 | 简体中文 | 한국어 | Español | Français | Deutsch | Português | Русский | Italiano | Nederlands | Polski | Türkçe | العربية | हिन्दी | ไทย | Tiếng Việt | Bahasa Indonesia | Bahasa Melayu
An intelligent work report generator for Claude Code that analyzes conversation logs and creates comprehensive work reports using AI.
Features
- AI-Powered Analysis: Uses OpenAI's GPT models to analyze conversations and generate intelligent summaries
- Multi-language Support: Generates reports in 19 languages (auto-detected from system locale)
- Smart Caching: Caches API responses to reduce costs and improve performance (12x speedup on cached runs)
- Parallel Processing: Process multiple projects concurrently for faster analysis
- Flexible Date Filtering: Generate reports for specific dates, weeks, or months
- Progress Indicators: Visual progress bars for long-running operations
- Token Usage Tracking: Monitor API usage and costs
- Template Customization: Customize AI prompts and report formats
Installation
From Source
# Clone the repository
# Build and install
Prerequisites
- Rust 1.70 or higher
- OpenAI API key
Configuration
API Key Setup
Set your OpenAI API key as an environment variable:
Or pass it directly via command line:
Default Paths
- Log Directory:
~/.claude/projects/(Claude Code's default project directory) - Cache Directory:
~/.cache/cc2report/ - Template File:
./cc2report.tomlor~/.config/cc2report/templates.toml
Usage
Basic Usage
Generate a report for today's conversations (default):
Generate a report for all conversations (no date filter):
Date Filtering
# Specific date
# Date range
# Current week
# Current month
Output Options
# Save to file
# JSON format
# Specify language (auto-detected by default)
# Example: Today's report in Japanese
# Example: This week's report in Spanish
Performance Options
# Enable parallel processing (max 10)
# Disable progress indicators
# Show token usage and costs
Cache Management
# Clear cache
# Show cache information
Template Customization
Generate a template file:
Edit the template to customize prompts and report formats.
Supported Languages
The tool automatically detects your system language and generates reports accordingly. Supported languages include:
- English (en)
- Japanese (ja)
- Chinese (zh)
- Korean (ko)
- Spanish (es)
- French (fr)
- German (de)
- Portuguese (pt)
- Russian (ru)
- Italian (it)
- Dutch (nl)
- Polish (pl)
- Turkish (tr)
- Arabic (ar)
- Hindi (hi)
- Thai (th)
- Vietnamese (vi)
- Indonesian (id)
- Malay (ms)
Report Structure
The generated reports include:
- Project Title and Objective: Clear summary of what was being worked on
- Activities: Categorized list of work performed
- Delivered Value: Concrete accomplishments and features implemented
- Technical Improvements: Code quality and performance enhancements
- Unresolved Issues: Any blockers or pending tasks
Cost Optimization
The tool includes several features to minimize API costs:
- Caching: Responses are cached for 24 hours
- Model Selection: Choose between different models based on cost/quality tradeoff
- Token Tracking: Monitor usage to stay within budget
Model Pricing (as of 2024)
| Model | Input Cost | Output Cost | Recommendation |
|---|---|---|---|
| gpt-4o (default) | $2.50/1M | $10.00/1M | Best quality |
| gpt-4o-mini | $0.15/1M | $0.60/1M | Best value |
| gpt-3.5-turbo | $0.50/1M | $1.50/1M | Budget option |
Example Report
**Objective**: Generate human-readable work reports from Claude Code logs
**Activities**:
- --
**Delivered Value**:
- --
**Technical Improvements**:
- -
Troubleshooting
Common Issues
-
"OpenAI API key is required"
- Ensure
OPENAI_API_KEYis set in your environment - Or use
--api-keyoption
- Ensure
-
"Log directory does not exist"
- Specify the correct path with
--log-dir - Default is
~/.claude/projects/
- Specify the correct path with
-
Rate Limit Errors
- Reduce parallel requests:
--parallel 1 - Use a lower-tier model:
--model gpt-3.5-turbo
- Reduce parallel requests:
Development
Building from Source
# Development build
# Run tests
# Run with debug output
RUST_LOG=debug
Architecture
The project is organized into the following modules:
parser: JSONL log file parsingconversation_analyzer: Extract topics and context from conversationsai_analyzer: OpenAI API integrationsmart_analyzer: Report generationcache: API response cachingtemplates: Customizable prompts and formatsconfig: Configuration managementerror: Error handlingcli: Command-line interface
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built for Claude Code (formerly Claude Engineer)
- Uses OpenAI's GPT models for intelligent analysis
- Inspired by the need for automated work reporting in AI-assisted development