Mapyr is a VS Code extension that feels native to the editor and surfaces repository health through Git history,
complexity analysis, duplication detection, and an interactive graph. Every surface is styled with VS Code tokens so it
slots naturally into sidebars, activity bar, and webviews.
Feature Highlights
Repository Insights view: A VS Code tree view showing bus factor, contributors, PR stats, churn, branches,
hotspots, complexity leaders, and duplication offenders.
Complexity + duplication badges: Each hot file shows MI/CC/Dup via escomplex and jscpd with banded badge colors.
Sidebar-native code graph: The Cytoscape view sits under the insights tree, auto-collapses noisy folders, and lets you
expand directories, inspect MI/CC/Dup badges, and open files without leaving the sidebar.
JSON export: Snapshot every metric into a document for sharing or further automation.
Commands
Command
Description
Mapyr: Refresh
Re-runs metric collection (Git, escomplex, jscpd) and refreshes both tree view + graph.
Mapyr: Export as JSON
Writes the latest metrics payload to a readonly JSON document.
Mapyr: Show File Ownership
Shows ownership breakdown for the active or selected file.
Mapyr: Open Metrics Graph
Opens the Cytoscape view with MI/CC/Dup badges and file navigation.
Development
npm install
npm run compile or npm run watch
Press F5 in VS Code to run the extension in a new Extension Development Host window.
npm run lint before submitting changes.
The extension activates on the Repository Insights view or any of the commands above, so it stays idle until a Mapyr
surface is opened.