claude-history-viewer

skill
Guvenlik Denetimi
Uyari
Health Uyari
  • No license — Repository has no license file
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 9 GitHub stars
Code Gecti
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Gecti
  • Permissions — No dangerous permissions requested
Purpose
This is a locally hosted Next.js web application that reads, parses, and displays your local Claude Code conversation history. It provides a dashboard to search, review, and export your past AI interactions for knowledge management.

Security Assessment
The overall risk is rated as Medium. The tool inherently accesses highly sensitive data by reading the contents of your local `~/.claude` directory, which contains your private AI prompts, code snippets, and full conversation logs. Because it is a web application built on Next.js, it starts a local server to display this data. While the automated code scan found no dangerous patterns, hardcoded secrets, or outbound network requests, the architecture means your sensitive conversation data is loaded into the browser's memory. Developers must ensure this local server is not exposed to untrusted networks.

Quality Assessment
The project appears to be actively maintained, with its most recent repository push occurring today. However, community trust and visibility are currently very low, as it only has 9 GitHub stars, indicating limited peer review. There is a discrepancy in its health status: the automated scan noted a missing license file, though the README claims it uses the MIT License. Without a verified license in the repository, legal usage and contribution rights remain technically unclear.

Verdict
Use with caution. The code appears safe to run, but developers should be aware that it processes sensitive local files and lacks significant community validation or verified licensing.
SUMMARY

一个用于查看、搜索和分析 Claude Code 对话历史的 Web 应用,帮助开发者回顾开发过程、总结复盘、了解项目数据。

README.md

Claude Code History Viewer

一个用于查看、搜索和分析 Claude Code 对话历史的 Web 应用,帮助开发者回顾开发过程、总结复盘、了解项目数据。

✨ 为什么需要这个工具?

使用 Claude Code 进行开发时,会产生大量有价值的对话数据。这个工具帮助你:

  • 📚 回顾开发过程 - 快速浏览完整对话历史,回顾问题解决思路
  • 📊 总结复盘 - 查看项目统计数据,了解开发节奏和模式
  • 🔍 知识检索 - 全文搜索历史对话,找到之前解决过的问题
  • 📈 数据洞察 - 了解与 AI 的协作情况,分析项目活跃度
  • 💾 知识沉淀 - 导出重要对话,形成项目文档

🎯 功能特性

📊 数据仪表盘

Dashboard

  • 查看最近 24 小时、7 天和总计的对话统计数据
  • 了解用户消息与 AI 回复的比例
  • 按项目查看活跃度排名

📋 会话列表

Session List

  • 浏览所有对话历史,按时间和项目筛选
  • 快速预览会话信息
  • 一键导出会话数据

💬 会话详情

Session Detail

  • 查看完整对话内容,包括用户消息、AI 回复和工具调用
  • 快速导航到消息位置
  • 查看原始消息或渲染后的内容
  • 支持 Markdown 语法高亮

🔍 全文搜索

Search

  • 搜索所有对话中的关键词
  • 实时显示搜索结果
  • 高亮匹配内容

📤 导出功能

  • 导出为 Markdown 格式
  • 导出为 JSON 格式
  • 导出为 HTML 格式

📱 响应式设计

  • 支持桌面和移动设备
  • 深色模式支持

🛠️ 技术栈

  • Next.js 14 - React 框架
  • TypeScript - 类型安全
  • Tailwind CSS - 样式
  • shadcn/ui - UI 组件库
  • date-fns - 日期格式化
  • Lucide React - 图标库
  • Recharts - 数据可视化

📦 安装

# 克隆项目
git clone https://github.com/gptmaas/claude-history-viewer.git
cd claude-history-viewer

# 安装依赖
npm install

🚀 运行

# 开发模式
npm run dev

# 生产构建
npm run build
npm start

应用将在 http://localhost:3000 启动。

⚙️ 配置

应用默认读取 ~/.claude 目录下的对话历史。如需修改,设置环境变量:

export CLAUDE_DIR=/path/to/your/.claude

或在 .env.local 文件中配置:

CLAUDE_DIR=/path/to/your/.claude

📁 项目结构

claude-history-viewer/
├── app/
│   ├── api/                    # API 路由
│   │   ├── sessions/           # 会话列表和详情 API
│   │   ├── search/             # 搜索 API
│   │   └── stats/              # 统计数据 API
│   ├── sessions/               # 会话页面
│   │   ├── page.tsx            # 会话列表
│   │   └── [id]/page.tsx       # 会话详情
│   ├── search/page.tsx         # 搜索页面
│   ├── page.tsx                # 首页仪表盘
│   ├── layout.tsx              # 根布局
│   └── globals.css             # 全局样式
├── components/
│   ├── ui/                     # shadcn/ui 组件
│   ├── markdown-renderer.tsx   # Markdown 渲染器
│   ├── json-viewer.tsx         # JSON 查看器
│   ├── tool-viewer.tsx         # 工具调用查看器
│   └── user-message-renderer.tsx  # 用户消息渲染器
├── lib/
│   ├── claude-history.ts       # Claude 历史数据解析
│   ├── xml-utils.ts            # XML 解析工具
│   ├── types.ts                # 类型定义
│   └── utils.ts                # 工具函数
├── docs/
│   └── static/                 # 文档图片
│       ├── dashboard.png
│       ├── session-list.png
│       └── session-detail.png
└── package.json

🎨 使用场景

开发复盘

定期查看项目统计数据,了解:

  • 本周完成了哪些任务
  • 与 AI 协作的频率
  • 项目活跃度趋势

问题解决

遇到类似问题时,搜索历史对话:

  • 快速找到之前的解决方案
  • 了解问题的上下文
  • 复用成功的解决思路

知识管理

导出重要的对话内容:

  • 形成项目文档
  • 记录最佳实践
  • 分享团队知识

🚧 后续扩展

  • 支持其他AI Coding工具如Trae、CodeX等
  • 添加用户认证(NextAuth.js)
  • 支持多用户和团队共享
  • 添加标签和收藏功能
  • 实时监控新对话
  • 部署到 Vercel/自托管服务器
  • 支持自定义数据源

📄 许可证

MIT License

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📮 联系方式

如有问题或建议,欢迎提交 Issue。


Made with ❤️ for developers using Claude Code

Yorumlar (0)

Sonuc bulunamadi