This is a VS Code extension that generates interactive dependency graphs for any codebase. Written in TypeScript, compiled to CommonJS, bundled with D3.js v7 locally.
src/extension.ts— VS Code entry point (exports activate/deactivate)src/commands.ts— All 8 registered commands + webview panel managementsrc/parser/— Dependency graph enginegraph.ts— GraphNode/GraphEdge interfaces, DFS circular detection, PageRank centralitytypescript.ts— ES imports, require, exports parserpython.ts— Python import/from-import parsergeneric.ts— File reference catcher ("./config.json")index.ts— CodeMapGenerator orchestrator (walk + parse + build + analyze)
src/providers/— Tree provider, map data provider, CodeLens providersrc/views/webview/— D3.js HTML/CSS/JS (offline, no CDN)src/status/— Status bar + progress indicatorssrc/utils/— File walker, glob filter, config readertest/— Mocha test suite + TS/Python fixtures
- TypeScript 6.0.3, target ES2022, module node16 (outputs CommonJS via "type": "commonjs" in package.json)
- VS Code 1.96+ API minimum
- D3.js v7.9.0 bundled locally in
src/views/webview/d3.min.js— fully offline - No external API calls — all analysis is local filesystem only
- Max 10,000 nodes default, configurable via codemap.maxNodes
npm install # copies d3.min.js to webview folder
npm run compile # tsc -p ./
npm test # runs mocha test suite
code . # open in VS Code
# F5 to debug extension| ID | Shortcut |
|---|---|
codemap.generateMap |
Ctrl+Shift+M |
codemap.refreshMap |
Ctrl+Shift+R |
codemap.findCircular |
— |
codemap.exportMap |
— |
codemap.toggleMap |
— |
codemap.openInMap |
— |
codemap.showDependencies |
— |
codemap.focusFile |
— |
- Strict TypeScript, no
anytypes - No comments in production code
- Small focused files — one responsibility per file
- Use VS Code API types from @types/vscode