Per-Product Cursor AI Metrics from the Dashboard Export
I built a tool to produce a per-product breakdown of AI-generated lines. If you must report that figure and your products span multiple repositories, Cursor gives you per-repository data. Getting to a per-product view means combining it with something that knows your repo-to-project mapping.
Getting the data Link to heading
The data is in Cursor’s analytics dashboard. The approach: connect to an existing Chrome session via the Chrome DevTools Protocol rather than building an authentication flow. Playwright attaches to a running Chrome instance, navigates to the dashboard as the already-logged-in user, and downloads the CSV export for each repository.
One non-obvious detail: the dashboard date picker resists reliable automation
through UI clicks. The dashboard also accepts startDate and endDate as URL
parameters, which set the range without any UI interaction:
https://cursor.com/dashboard?tab=analytics&tz=utc&startDate=2025-10-28&endDate=2026-01-23
This looks involved, but the Playwright script itself was AI-generated. I described the problem, including the date picker issue, and had working code within an hour.
Mapping repositories to projects Link to heading
The Bitbucket REST API provides exactly that: repo-to-project mappings for the entire workspace in a single paginated request. Running that against the Cursor data produces a lookup table; the per-repo daily statistics then aggregate to per-project totals: total lines, AI lines, and AI percentage over time.
What the number tells you Link to heading
The result: AI-generated lines broken down by product area, with daily trend data. It is a reasonable proxy for adoption at the team level. What it cannot tell you is whether the AI contribution was well-reviewed, whether it introduced complexity, or where it actually moved the needle.
Lines are countable; value is not.
What that number means for how you should think about AI adoption is the subject of a companion post.