UNPKG

claude-code-exporter

Version:

Export, analyze, and aggregate Claude AI conversation sessions with TypeScript support and MCP integration

126 lines (89 loc) โ€ข 5.13 kB
# Claude Code Exporter [![npm version](https://img.shields.io/npm/v/claude-code-exporter.svg)](https://www.npmjs.com/package/claude-code-exporter) [![npm downloads](https://img.shields.io/npm/dm/claude-code-exporter.svg)](https://www.npmjs.com/package/claude-code-exporter) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Node.js Version](https://img.shields.io/node/v/claude-code-exporter.svg)](https://nodejs.org) > Export, analyze, and aggregate your Claude Code conversation sessions with ease Claude Code Exporter is a powerful TypeScript tool that helps you extract, organize, and analyze your Claude AI conversations. Whether you need to document your AI-assisted development sessions, create knowledge bases, or analyze conversation patterns, this tool provides comprehensive export capabilities with multiple formats and intelligent aggregation features. ## ๐Ÿš€ Quick Start ```bash # Install globally npm install -g claude-code-exporter # Run interactively claude-prompts # Export with options claude-prompts --prompts --markdown -o ./exports # Recommend demo command claude-prompts aggregate --both --structured --mermaid -o "./_demo-aggregate/ ``` ๐Ÿ“– **[Full Quickstart Guide โ†’](docs/getting-started/quickstart.md)** ## ๐Ÿ“š Documentation ### Getting Started - **[Installation Guide](docs/getting-started/installation.md)** - Install and set up the tool - **[Quickstart Tutorial](docs/getting-started/quickstart.md)** - Get running in 5 minutes - **[Version Comparison](docs/versions-comparison.md)** - Understand V1 vs V2 vs MCP ### Usage Guides - **[CLI Reference](docs/usage/cli-reference.md)** - Complete command-line options - **[Export Options](docs/usage/export-options.md)** - Formats, modes, and outputs - **[Configuration](docs/configuration.md)** - Environment variables and settings ### API & Development - **[Programmatic API](docs/api/programmatic-usage.md)** - Use in your code - **[Architecture Overview](docs/development/architecture.md)** - Technical design - **[Contributing Guide](docs/development/contributing.md)** - Help improve the project ### Support - **[Troubleshooting](troubleshooting.md)** - Common issues and solutions - **[GitHub Issues](https://github.com/developerisnow/claude-code-exporter/issues)** - Report bugs - **[Discussions](https://github.com/developerisnow/claude-code-exporter/discussions)** - Ask questions ## โœจ Key Features - **๐Ÿ”„ Export Conversations** - Extract prompts, outputs, or full conversations from Claude sessions - **๐Ÿ“Š Smart Aggregation** - Aggregate and analyze prompts across multiple projects - **๐ŸŽฏ Multiple Export Modes** - Choose between prompts-only, outputs-only, or full conversations - **๐Ÿ“ Multiple Formats** - Export to Markdown, JSON, TXT, or all formats simultaneously - **๐Ÿ”Œ MCP Integration** - Use as a Model Context Protocol server with Claude Desktop - **๐Ÿ—๏ธ Clean Architecture** - Built with NestJS using Domain-Driven Design principles - **๐Ÿ“ Organized Output** - Timestamped directories with intelligent file organization - **๐ŸŽฎ Interactive Mode** - User-friendly wizard for easy configuration - **๐Ÿงช Fully Tested** - Comprehensive test coverage for reliability ## ๐ŸŽฏ Choose Your Version We offer three ways to use Claude Code Exporter: | Version | Best For | Setup Required | |---------|----------|----------------| | **[V1 - CLI](docs/usage/cli-reference.md)** | Quick exports, no database needed | None | | **[V2 - Full](docs/api/programmatic-usage.md)** | Production use, REST API, database | PostgreSQL | | **[MCP - Claude Desktop](docs/getting-started/installation.md#mcp-server-for-claude-desktop)** | Use within Claude Desktop | Node 20.x | **Not sure which to use?** โ†’ **[Read the Version Comparison](docs/versions-comparison.md)** ## ๐Ÿ› ๏ธ Example Commands ```bash # Export only your prompts as markdown claude-prompts --prompts --markdown # Export full conversations from last week claude-prompts --full --json --period 7d # Aggregate all prompts across all projects claude-prompts --aggregate -o ./all-prompts # Export everything in all formats claude-prompts --full --both ``` ## ๐Ÿ“ฆ Installation ```bash # Global CLI installation (recommended) npm install -g claude-code-exporter # For Claude Desktop integration npm install -g mcp-claude-code-exporter # As project dependency npm install claude-code-exporter ``` **[Full Installation Guide โ†’](docs/getting-started/installation.md)** ## ๐Ÿค Contributing We welcome contributions! Please see our **[Contributing Guide](docs/development/contributing.md)** for details. ## ๐Ÿ“„ License MIT License - see [LICENSE](LICENSE) file for details. ## ๐Ÿ™ Acknowledgments Built with: - [NestJS](https://nestjs.com/) - Enterprise-grade Node.js framework - [Commander](https://github.com/tj/commander.js/) - CLI framework - [TypeORM](https://typeorm.io/) - TypeScript ORM - [Model Context Protocol](https://github.com/anthropics/model-context-protocol) - MCP integration --- <div align="center"> Made with โค๏ธ by developers, for developers </div>