ccdigest
v0.1.1
Published
CLI tool to process and format Claude Code conversation logs with user-focused display
Downloads
58
Maintainers
Readme
ccdigest
A CLI tool to process and format Claude Code conversation logs with user-focused display. Parse Claude Code export logs and output chronological conversation records in Markdown or HTML format, emphasizing user dialogue.
🚀 Features
- User-Centric Display: Show all user messages prominently with Claude responses as collapsible summaries
- Multiple Format Support: Optimized Markdown (GitHub-ready) and interactive HTML output
- Flexible Filtering: User-specific filtering, summary-only mode, and other output controls
- Tool Usage Tracking: Detailed recording of tools used by Claude
- Session Statistics: Automatic generation of session metadata
📦 Installation
Install from npm
# Global installation
npm install -g ccdigest
# One-time execution
npx ccdigest process your-log.txtDevelopment Usage
# Clone repository
git clone https://github.com/makikub/ccdigest.git
cd ccdigest
# Install dependencies
npm install
# Build
npm run build
# Usage example
npm run dev -- process test-log.txt🎯 Usage
Basic Examples
# Output in Markdown format (default)
ccdigest process session.txt
# Output in HTML format
ccdigest process session.txt --out html
# Output HTML and open in browser
ccdigest process session.txt --out html --open
# Custom output filename
ccdigest process session.txt --file my-session.md
# Specify session title
ccdigest process session.txt --title "Bug Fix Session"Filtering Options
# Extract messages from specific user only
ccdigest process session.txt --user john
# Show Claude summaries only (hide details)
ccdigest process session.txt --summary-only
# Combined usage
ccdigest process session.txt --user john --summary-only --title "John's Summary"⚙️ Configuration Management
# Show current configuration
ccdigest config show
# Change configuration values
ccdigest config set defaultUser john
ccdigest config set outputDir ./logs
# Reset configuration values
ccdigest config set defaultUser ""Available Configuration Options
| Key | Default Value | Description |
|-----|---------------|-------------|
| defaultUser | "user" | Default username |
| outputDir | "./output" | Output directory |
| dateFormat | "YYYY-MM-DD" | Date format |
📝 Input File Format
Supports plain text files exported from Claude Code's /export command.
Supported Formats
- Timestamped conversation logs
- Distinction between user, Claude, and system messages
- Tool usage information extraction
- Proper handling of code blocks
Input Example
[09:14] 🧑💻 User: I want to fix the current bug
[09:15] 🤖 Claude: Let me check the bug details.
Using Read tool on: src/main.js
...
[09:16] 🧑💻 User: Thank you📊 Output Formats
Markdown Output
- GitHub-optimized formatting
- Collapsible sections using
<details>tags - Statistics section
- Perfect for Pull Requests and documentation
HTML Output
- Interactive collapsible UI
- Beautiful styling
- Browser-optimized display
- Ideal for presentations and sharing
🛠️ Development
Requirements
- Node.js 18.0.0 or higher
- npm or yarn
Development Environment Setup
git clone https://github.com/makikub/ccdigest.git
cd ccdigest
npm installAvailable Scripts
# Development server
npm run dev
# Build
npm run build
# Run tests
npm test
# Run linter
npm run lint
# Auto-fix linting issues
npm run lint:fixProject Structure
ccdigest/
├── src/
│ ├── cli.ts # CLI entry point
│ ├── processor.ts # Log parsing engine
│ ├── config.ts # Configuration management
│ ├── formatters/ # Output formatters
│ │ ├── base.ts
│ │ ├── markdown.ts
│ │ └── html.ts
│ ├── utils/ # Utilities
│ └── types.ts # Type definitions
├── tests/ # Test files
└── bin/ # Executable files🤝 Contributing
- Fork this repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Create a Pull Request
📄 License
MIT License - see the LICENSE file for details
🙏 Acknowledgments
This project was inspired by Sniffy.
📞 Support & Contact
- Issues: GitHub Issues
- Discussions: GitHub Discussions
