@lim324/my-claude-code-viewer
v0.0.3
Published
CLI tool to view Claude Code statistics
Maintainers
Readme
My Claude Code Viewer
A CLI tool to view Claude Code statistics from your local sessions.
Features
- 📊 View global statistics (total projects, sessions, messages, cost)
- 📁 Browse projects and their sessions
- 💰 Cost estimation with token usage breakdown
- 🌐 Web interface with dark theme
- 🔌 RESTful API endpoints
Installation
# Clone the repository
cd my-claude-code-viewer
# Install dependencies
pnpm install
# Build the project
pnpm build
# Link for global usage
npm linkUsage
Start the server
# Default port (8888)
my-claude-code-viewer
# Custom port
my-claude-code-viewer --port 3000Web Interface
Open your browser and navigate to http://localhost:8888
API Endpoints
GET /api/stats- Global statisticsGET /api/projects- List all projectsGET /api/projects/:id- Project details with sessionsGET /api/projects/:projectId/sessions/:sessionId- Session details
Data Source
The tool reads Claude Code session data from ~/.claude/projects/
Each project directory contains .jsonl files representing individual sessions.
Development
# Run in development mode with auto-reload
pnpm dev
# Build
pnpm build
# Start
pnpm startTechnology Stack
- TypeScript
- Express.js
- Commander.js (CLI)
- HTML/CSS (frontend)
License
MIT
