Skip to content

danjamk/claude-code-analytics

Repository files navigation

Claude Code Analytics

A Python package for analyzing Claude Code conversation history to extract meaningful productivity insights and usage patterns.

What it does

This tool analyzes your Claude Code conversation data to provide insights into:

  • Session & Usage Metrics: Tool usage, file operations, conversation patterns
  • Productivity Insights: Code generation vs. modification ratios, task management patterns, development velocity
  • Workflow Analysis: Read-then-edit patterns, research-to-implementation flows, session productivity scores

Setup

Requirements

  • Python 3.11+
  • Poetry

Installation

  1. Clone the repository:
git clone <repo-url>
cd claude-code-analytics
  1. Install dependencies:
poetry install
  1. Activate the virtual environment:
poetry shell

Usage

Analyze your Claude Code conversation history:

# Analyze all projects in the current directory
claude-analytics analyze projects

# Analyze your actual Claude Code data
claude-analytics analyze ~/.claude/projects

Run tests:

pytest

Run tests with coverage:

pytest --cov=claude_code_analytics

Example Output

The tool provides aggregate analytics across all your conversations including file operations, productivity metrics, workflow patterns, and development insights.

Development Status

  • ✅ Phase 1: Session & Usage Metrics
  • ✅ Phase 2: Productivity Insights
  • 🔄 Future phases: Project analysis, development flow patterns, learning analytics

See project-plan.md for detailed roadmap.

About

utility to analyze claude code conversation data for metrics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages