Open source · MIT · zero dependencies

The architecture diagram that draws itself.

Stackmap reads your code and maps every service, database, queue and third-party API, then links each box and arrow to the exact line that proves it. One command. No AI, no account, nothing uploaded.

$ npx stackmap-cli
See real maps
9 languages500+ technologiesUnder a second on most reposWorks offline
Plane, mapped by Stackmap. Click any box.Open full screen

Everything your system talks to, with receipts

The real architecture lives in manifests, compose files, env templates, infrastructure code and imports. Stackmap reads all of it, so the map matches the code you ship today.

Every box has a receipt

Click a database and see every service that uses it, through which ORM, with the import lines and a link to them on GitHub. AI-drawn diagrams guess; Stackmap only draws what it can prove.

$ npx stackmap-cli why stripe

A README diagram that never goes stale

Keep a Mermaid diagram between two markers in your README. GitHub renders it natively, and CI fails when the code and the diagram disagree.

$ npx stackmap-cli readme --check

Architecture review on every pull request

The GitHub Action comments when a pull request adds a database, a service-to-service call or a new third-party API, with a diagram of just the change.

- uses: AnshumaanSinghh/Stackmap@v1

Rules your CI enforces

"Frontends never touch the database." "Only the API calls AI providers." Write it once in .stackmap.json; violations are annotated on the line that caused them.

{ "deny": "kind:app -> category:database" }

A map for your AI agent

An MCP server gives Claude Code, Cursor and other agents the system's shape before they edit it: what uses what, what breaks if it changes.

$ claude mcp add stackmap -- npx -y stackmap-cli mcp

Private by design

Runs locally, makes no network requests, never reads .env files and never stores values. The HTML map is one self-contained file you can attach anywhere.

$ npx stackmap-cli -f md -o STACK.md
Apps Services Workers Data stores Third-party APIs Solid: used in code · Dashed: declared but never imported · Dotted: inferred

How it works

Deterministic static analysis. Same code in, same map out.

Find the units

Every folder with a manifest (package.json, pyproject.toml, go.mod, Cargo.toml, Gemfile, pom.xml ...) is an app, service, worker or library.

Read the code once

Imports, env vars read and API hosts called, in nine languages. Tests, scripts and tool config are skipped.

Match the catalog

500+ technologies, each name verified against its registry: SDKs, drivers, Docker images, env vars, hosts and Terraform types.

Read the infrastructure

docker-compose, Kubernetes, Terraform, Wrangler, Render, ORM config and .env.example files wire the boxes together.

How it compares

Stackmap answers the question new teammates, reviewers and auditors ask: what is this system made of, and what does it talk to?

StackmapHand-drawnDiagrams as codeAI generatorsImport graphs
Draws itself from the code✓✗✗✓✓
Services, databases, queues, third-party APIs✓✓✓partlyfiles only
Every box links to the code behind it✓✗✗✗✓
Deterministic✓n/a✓✗✓
Code stays on your machine✓✓✓usually not✓
Comments architecture changes on PRs✓✗✗✗✗

Get started on GitHub