Point it at any repository and get an interactive map of every file and import. One command, one HTML file.
node codemap.js . -o map.html --open
It scans the repo, resolves the imports, weighs each file, and writes a single HTML file you open, pan, and share.
Walks the tree, skips node_modules and build output, reads every import statement.
Maps relative imports to real files, counts lines, and pulls git churn so hot files stand out.
A seeded force simulation runs in the CLI, so the same repo always draws the same map.
Graph data is inlined into a canvas viewer with pan, zoom, search, hotspot mode, and a minimap.
Every file is a node, every import a line. Relative paths resolve to real files, so the structure you see is the structure that ships, not a guess.
Resize files by git churn instead of lines. The code that changes most floats to the top.
The output loads nothing from the network. A test fails the build if the viewer ever tries to.
A fixed seed drives the force simulation, so committing a map produces clean diffs and no jitter between runs. Large repos keep the heaviest files and report exactly how many were set aside.
Node 16 and one file. Clone it, or drop codemap.js straight into any project.