Weekend Project • AICompleted

Cursor Stats Extension

A browser extension that visualizes your Cursor AI coding activity with interactive charts and calendars. Tracks agent messages, accepted code suggestions, and token usage to help optimize your AI-powered development workflow.
View Source →Live Demo →
Built with
TypeScriptChrome ExtensionChart.jsWXTReact

Key Features

01Agent Messages Calendar - visualize daily AI chat requests
02Accepted Lines Calendar - track accepted code suggestions
03Token Usage Bar Chart - monitor consumption over 30 days
04Cost Analysis - translate tokens to real dollars
05Privacy-focused - all analysis happens locally

Overview

Cursor Stats Extension bridges the gap between AI-powered coding and productivity insights. As developers increasingly rely on AI assistants like Cursor, understanding usage patterns becomes crucial for optimizing workflows and managing costs. This extension provides comprehensive analytics by parsing Cursor's local data and presenting it through intuitive visualizations, helping developers make data-driven decisions about their AI usage.

Features

Interactive heatmap calendars showing daily AI activity patterns
Comprehensive token usage tracking with cost calculations
Real-time data fetching from Cursor's local analytics
Privacy-first approach - no data leaves your browser
Modern dark-themed UI with responsive design
Export functionality for data analysis
Trend analysis and productivity insights
Support for multiple Cursor accounts and workspaces

Technical Details

Architecture

Built using WXT framework for cross-browser compatibility, with React components for UI and Chart.js for data visualization. The extension uses Chrome's Extension API to access local file system and parse Cursor's analytics data.

Challenges

Parsing Cursor's proprietary analytics format and handling schema changes
Implementing efficient data processing for large usage datasets
Creating responsive calendar visualizations that work across different screen sizes
Ensuring privacy compliance while providing meaningful analytics
Managing asynchronous data loading and state management

Solutions

Developed robust JSON parsing with fallback mechanisms for different Cursor versions
Implemented progressive data loading with caching to handle large datasets
Used CSS Grid and Flexbox for responsive calendar layouts
Designed local-only architecture with no external data transmission
Utilized React hooks and context for efficient state management

Key Learnings

Deep understanding of Chrome Extension Manifest V3 architecture
Advanced data visualization techniques using Chart.js and D3.js
Privacy-focused software design principles
Cross-browser compatibility considerations
Performance optimization for data-intensive applications

Impact

Built in
6 weeks
Featured on Chrome Web Store with 4.8/5 rating
Open source with 15+ GitHub stars
Used by developers across 20+ countries
Processed analytics for 50,000+ AI interactions