Open source and dependency free

See the shape
of your code.

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
codemap · your-repoopen ↗

One command. A map you can read.

It scans the repo, resolves the imports, weighs each file, and writes a single HTML file you open, pan, and share.

$ node codemap.js ~/work/your-app --open
Codemap: 312 files, 1.2k links, 48k lines
→ ~/work/your-app/codemap.html

# open it, drag to pan, scroll to zoom,
# click a file to trace what it imports.
  1. 1
    Scan and parse

    Walks the tree, skips node_modules and build output, reads every import statement.

  2. 2
    Resolve and weigh

    Maps relative imports to real files, counts lines, and pulls git churn so hot files stand out.

  3. 3
    Lay out deterministically

    A seeded force simulation runs in the CLI, so the same repo always draws the same map.

  4. 4
    Emit one HTML file

    Graph data is inlined into a canvas viewer with pan, zoom, search, hotspot mode, and a minimap.

Resolves imports across TypeScript, JavaScript, JSX, Vue, Svelte, Python, and CSS, and weighs every file by git churn.

Built to be read, and to stay honest.

The import graph, resolved

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.

Hotspot mode

Resize files by git churn instead of lines. The code that changes most floats to the top.

Offline by design

The output loads nothing from the network. A test fails the build if the viewer ever tries to.

Deterministic layout

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.

Map your repo in the next ten seconds.

Node 16 and one file. Clone it, or drop codemap.js straight into any project.