Track AI-Generated Code in Cursor — Per-Line Provenance
Guide
Cursor can rewrite whole files in seconds — and your git history cannot tell you which changes came from the AI. Here is how to add per-line Cursor provenance to your workflow: attribution, review status, and risk scoring, self-hosted and free.
The Cursor visibility gap
Cursor applies AI edits through Tab completions, inline Cmd+K edits, Composer multi-file changes, and agent mode. After a few weeks a repository can be majority-AI-written with zero git-level evidence. When a license or security question arrives — where did this function come from? — there is no answer.
How capture works
The LineageLens VS Code extension observes AI insertions inside Cursor's editor layer and records per-line attribution: tool, session, timestamp, developer, and accepted/rejected status. Records stay local in Base; Lite adds the dashboard and proxy capture in one Docker container; Plus adds team-wide feeds, semantic search and a GitHub Actions gate that flags unreviewed high-risk AI code before merge.
Because Cursor is a VS Code fork, capture works identically — no separate plugin, no workflow change.
Start tracking Cursor code today
- Install LineageLens Base in Cursor from the VS Code Marketplace.
- Use Cursor normally — capture is automatic and local.
- Run
lineagelens blameto see which lines Cursor wrote.