CodeAtlas
Architecture guardrails for human- and AI-written code. CodeAtlas maps your call graph, tells you (or your coding agent) what a change will break, and fails CI when a PR adds a new circular dependency or crosses a layer boundary. One pip install, zero runtime dependencies, nothing leaves your machine.
👉 Live demo: explore Flask's call graph in your browser
uvx codeatlas-viz serve . # interactive map of the current repo, no install
codeatlas setup # register the MCP server for Claude Code, Cursor and VS Code
Real-world results
I built CodeAtlas for my own projects and test every release on them. Numbers below are from codeatlas scan on a 2-core ARM cloud VM (November 2026); every "unreferenced" function was checked by hand with grep.
| Project | Stack | Files / lines | Scan | Found |
|---|---|---|---|---|
| Mezar Café, a multiplayer browser game site with 220+ registered players | Python (aiohttp) + plain JS | 457 / 146,299 | 4.0 s | 3 functions nothing calls, 5 call cycles (one is the intentional move → land → draw-card loop of the board game) |
| MezarBot, a Discord bot (music, moderation, private voice rooms) | Python, discord.py | 48 / 19,133 | 0.3 s | 7 unused helpers (UI formatters, DB helpers), 5 cycles in the music player state machine |
| Twinely, a shared calendar app | Rust (axum) + SvelteKit + TS | 172 / 16,427 | 0.3 s | 0 unreferenced, 1 cycle, health 92/100 |
| pallets/flask (live demo) | Python | 83 / 18,472 | 0.2 s | top hubs Flask, render_template, url_for; 2 cycles |
| django/django (live demo) | Python | 3,004 / 558,059 | 9 s | 63 cycles; production hubs ValidationError, ImproperlyConfigured once tests are hidden |
Framework awareness is what makes these numbers useful: discord.py cogs, axum handlers passed to routers, impl Trait for blocks, Svelte onclick={save}, Cloudflare onRequest, getattr(self, "fire") and pytest tests are recognised, so on the same projects version 0.4.1 reported 1,220 / 362 / 222 "dead" functions, almost all false alarms.
What people look for, and where CodeAtlas stands
From the features and open issues of the most popular code-graph tools (November 2026), these are what users ask for most:
| Users want | CodeAtlas |
|---|---|
| Correct call edges (the #1 complaint in other tools' issues) | Measured: 99% precision, 88–90% recall on Flask/Click (bench); framework-aware dead code |
| Blast radius of a change, with risk | impact, MCP blast_radius / check_changes, LOW→CRITICAL risk with reasons |
| Which tests to run | pytest $(codeatlas impact --diff origin/main --format pytest) |
| Hubs, chokepoints, hotspots | scan: most called, chokepoints (betweenness), most complex, test gaps |
| Graph that stays fresh while an agent edits | MCP refreshes itself; unchanged files are never re-parsed (Django rescan 15 s → 2 s) |
| One-command agent setup | codeatlas setup (Claude Code, Cursor, VS Code) or the Claude Code plugin |
| Small, bounded MCP replies | 11 tools; long lists cut with exact totals (a Django blast radius: 1.7 MB → 27 KB) |
| Interactive visualization | serve, static site export, phone-friendly, folder overview and focus mode |
| PR comment and CI gate | GitHub Action + check --baseline: fail only on new cycles / layer violations |
| Exports | JSON, HTML, Markdown, Mermaid, DOT (Graphviz), GraphML (Gephi, yEd), cards |
Deliberately out of scope: rename/refactor (use your editor's language server) and semantic/embedding search (CodeAtlas has no model or index to keep in sync).
Why CodeAtlas
Coding agents write a lot of code quickly. They also quietly add import cycles, call the database from the UI layer, and change functions without knowing who calls them. CodeAtlas gives you three things in one small tool:
| What you get | |
|---|---|
| For your agent (MCP) | check_changes lets the agent verify its own edits before it says "done": new cycles, new boundary violations, health delta, blast radius. Plus callers/callees, shortest call path, file outline and symbol source in one call. 11 tools, so the schema stays small in the prompt. |
| For you (UI) | codeatlas serve: an interactive call graph with hubs, cycles, unreferenced code, path finder and blast radius. codeatlas export --format site publishes the same map as a static site, like the live demo. |
| For CI (rules) | codeatlas check --baseline origin/main fails only on new cycles or boundary violations, so legacy debt doesn't block you. A GitHub Action posts an architecture diff + blast radius comment on every PR. |
And it stays out of your way: pure Python standard library, no database, no index directory, no daemon, no API keys, no telemetry. It scans a few hundred files in seconds and works offline or in locked-down CI.
Quick start
pip install codeatlas-viz # or: uvx codeatlas-viz <command>, pipx install codeatlas-viz
codeatlas scan . # terminal summary: hubs, cycles, health score
codeatlas serve . # interactive UI at http://127.0.0.1:4173
codeatlas impact . # blast radius + risk level of your uncommitted changes
codeatlas init # write .codeatlas.toml: today's baseline + suggested layer rules
codeatlas setup # register the MCP server for Claude Code, Cursor and VS Code
pytest $(codeatlas impact --diff origin/main --format pytest) # run only the tests your change reaches
codeatlas check . --baseline origin/main # CI gate: fail only on NEW cycles / rule violations
Works the same on Linux, macOS and Windows (Python 3.10+, nothing to compile, no system libraries):
| OS | Easiest | Alternative |
|---|---|---|
| Linux | uvx codeatlas-viz serve . |
pipx install codeatlas-viz |
| macOS | uvx codeatlas-viz serve . (brew install uv) |
pipx install codeatlas-viz |
| Windows | uvx codeatlas-viz serve . (winget install astral-sh.uv) |
py -m pip install codeatlas-viz |
Windows paths (src\app.py), CRLF line endings, symlinked project folders and legacy console encodings are covered by the test suite. codeatlas diff, --baseline and impact need git on the PATH; everything else works without it.
Languages: Python (full ast), JavaScript, TypeScript and Svelte (structural parser, optional Tree-sitter), Go, Rust, Java, C and C++ (structural parser, optional Tree-sitter: pip install "codeatlas-viz[treesitter]").
Exclude files from the graph
Set repository-wide ignore patterns in .codeatlas.toml:
[scan]
ignore = ["examples/*", "*_pb2.py"]
Add repeatable --ignore PATTERN flags to scan, serve, export, impact,
check, diff, mcp, or init to extend these exclusions.
codeatlas export . --ignore './scratch/*' --ignore 'generated.py'
Patterns match filenames and paths relative to the scan root. The same exclusions
apply to rescans in serve and mcp and to Git baselines. For a JSON baseline,
export the snapshot with the same ignore patterns.
Both saved and previewed init configurations include the scan exclusions used
to build their baseline.
Built for big codebases too
A 3,000-file repository has tens of thousands of functions; drawing all of them at once helps nobody. So the UI starts where people start:
- Folder overview first on large repos, with tests hidden, edges weighted by how many calls cross between folders. (Django demo)
- Focus mode: pick any function and see its callers in columns on the left and callees on the right, two hops deep. Readable at any repo size.
- Blast radius that stays readable: the closest 80 callers are drawn, the rest are listed, and a "where it lands" summary shows which folders take the hit.
- "Start here" panel with the busiest function, the first circular dependency and the unreferenced list one click away.
- Fast: on Django (44,000 symbols, 58,000 call edges) clicks respond in under 0.4 s and the static demo transfers ~1.4 MB.
- Works on phones: pinch-to-zoom, a compact header and a details bottom sheet, with finger-sized tap targets.
Use it with your coding agent (MCP)
Claude Code
claude mcp add codeatlas -- uvx codeatlas-viz mcp
or install it as a plugin, which also adds a /codeatlas:check skill:
/plugin marketplace add kutyfuty/codeatlas
/plugin install codeatlas@codeatlas
Cursor, Windsurf, Claude Desktop, any MCP client
{
"mcpServers": {
"codeatlas": { "command": "uvx", "args": ["codeatlas-viz", "mcp", "/path/to/repo"] }
}
}
| Tool | What it answers |
|---|---|
check_changes |
Did my edits add a cycle, break a boundary rule or lower the health score? What do they affect, and how risky is it? |
blast_radius |
Who calls this file/symbol (transitively), which entrypoints and tests reach it, and a LOW→CRITICAL risk level with reasons |
get_symbol |
Source + direct callers + callees of a symbol in one call |
get_callers / get_callees |
Direct neighbours in the call graph |
trace_path |
Shortest call chain from A to B |
get_file_outline |
Classes/functions in a file with line ranges and fan-in/out |
search_symbols |
Find symbols by name or path |
get_overview |
Size, languages, hubs, cycles, health score |
find_cycles_and_dead_code |
Cycles, unreferenced callables, rule violations |
rescan |
Force a rescan (the graph also refreshes automatically when scanned files change) |
Architecture rules in CI
Start with codeatlas init: it writes a .codeatlas.toml with today's numbers as the baseline and suggests boundary rules from your folder layout (UI → database, domain → infrastructure, handlers → repositories, shared helpers → app code). Or write rules yourself:
[check]
max_cycles = 0
min_health = 80
[[rules]]
name = "UI must go through the service layer"
from = "src/ui/*"
forbid = "src/db/*"
codeatlas check . # whole repo
codeatlas check . --baseline origin/main # only NEW cycles / violations fail
codeatlas diff . --base origin/main --with-impact --format markdown # PR report
See boundary rule examples for Django, React/Next.js, clean/hexagonal architecture, and FastAPI layouts.
GitHub Action
name: CodeAtlas Architecture
on: [pull_request]
permissions:
contents: read
pull-requests: write
jobs:
architecture:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: kutyfuty/codeatlas@v0.9.3
with:
baseline-only: "true"
comment-on-pr: "true"
Share your architecture map
# "Architecture X-ray" image for a tweet/LinkedIn post (1200x630) or a TikTok/Reels/Shorts story (1080x1920):
codeatlas export . --format card -o xray.svg
codeatlas export . --format story -o xray-story.svg
# Static interactive site (GitHub Pages, Netlify, any host). Code previews link to GitHub:
codeatlas export . --format site -o site/ --source-url https://github.com/you/repo/blob/main
# Health badge for your README:
codeatlas export . --format badge -o docs/codeatlas-badge.svg
# Single-file HTML report, Markdown summary, Mermaid diagram or raw JSON:
codeatlas export . --format html -o report.html
codeatlas export . --format markdown -o SUMMARY.md
codeatlas export . --format mermaid -o architecture.mmd
codeatlas export . --format json -o graph.json
codeatlas export . --format dot -o graph.dot # Graphviz
codeatlas export . --format graphml -o graph.graphml # Gephi, yEd, Cytoscape, networkx
Exports never contain your local absolute paths. The site only includes source code if you pass --embed-source.
Media kit
Screen recordings (vertical 1080×1920 and 16:9), screenshots, X-ray cards, logo text and a ready video script live in docs/media/. Use them freely to write about or make videos of CodeAtlas.
How it compares
There are excellent code-graph tools; pick the one that fits your workload. Facts below are from each project's own documentation as of November 2026.
| CodeAtlas | code-review-graph | GitNexus | Serena | import-linter / dependency-cruiser | |
|---|---|---|---|---|---|
| Install footprint | stdlib only, no index | Tree-sitter + SQLite index | Node + native builds + graph DB | Python + language servers | Python-only / JS-only |
| License | MIT | MIT | PolyForm Noncommercial | see repo (license changed in v2) | BSD / MIT |
| Configurable layer rules + baseline gate | ✅ (+ init suggestions) |
coupling warnings | — | — | ✅ (imports only, one language) |
| Change risk level with reasons | ✅ | ✅ risk score | confidence scores | — | — |
| Framework-aware dead code | ✅ discord.py, axum, Svelte, pytest, Cloudflare… | partial | — | — | — |
| Agent self-check of its edits | ✅ check_changes |
✅ impact radius | ✅ change detection | — | — |
| Interactive UI / static site export | ✅ / ✅ | D3 viz | web explorer | — | graphs via Graphviz |
| Precision | measured: 99% precision, 88–90% recall on Flask/Click (bench) | Tree-sitter AST | Tree-sitter AST | compiler-grade (LSP) | exact imports |
| Languages | 9 | ~35 | 10–18 | 40+ | 1 each |
Where CodeAtlas is the better fit: you want layer rules and "no new cycles" enforced in CI across languages, a tiny MCP surface for your agent, and zero setup (works in air-gapped or locked-down environments). Where others win: very large monorepos, compiler-grade precision (Serena), many more languages, semantic search, persistent indexes.
Accuracy, measured
Static call graphs are always approximations, so CodeAtlas measures itself instead of claiming. On two real projects (details and a one-command reproduction in bench/):
| Project | Recall: real calls found | Precision: edges confirmed by Jedi |
|---|---|---|
| pallets/flask | 87.9% (501 / 570) | 99.5% (392 / 394) |
| pallets/click | 90.5% (1,388 / 1,533) | 99.2% (952 / 960) |
Recall is checked against calls recorded while each project's test suite runs; precision against Jedi, the "go to definition" engine used by many editors. Version 0.7 scored 67.7% / 88.9% on Flask.
Accuracy notes
CodeAtlas resolves calls statically: bare calls, self.x() and super().x(), typed receivers (svc: Service, x = Service(), self.serializer = Serializer(), return annotations such as def get() -> Service), pytest fixtures (def test(runner) with a runner fixture returning CliRunner()), module and submodule calls (utils.load(), flask.json.dumps()), package re-exports and virtual dispatch to subclass overrides. Calls on untyped receivers match a method only when its name is unique in the project or belongs to one class family; generic names (get, pop, json...) are never guessed. Cycles are computed on direct calls only. Dynamic dispatch (getattr, dependency injection) can't be seen statically, so "unreferenced" means candidate, not proof. Bug reports with a minimal example are very welcome.
Security
codeatlas serve listens on 127.0.0.1 only, previews nothing but the scanned source files, and refuses requests from other websites (no CORS, Host-header and Sec-Fetch-Site checks). Passing --host 0.0.0.0 exposes your source code to everyone on the network. Git refs from the API, MCP and CLI are validated so they can't be turned into git options.
Contributing
New language analyzers, resolution improvements and UI ideas are all welcome. Look for good first issue and read CONTRIBUTING.md.
pip install -e ".[dev]" && pytest # backend tests
cd frontend && npm ci && npm run build # rebuild the UI bundle (src/codeatlas/web/)
License
Metadata
Release files for codeatlas-viz 0.9.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codeatlas_viz-0.9.3.tar.gz | 139.5 kB | With provenance | Details for codeatlas_viz-0.9.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codeatlas_viz-0.9.3-py3-none-any.whl | Python 3 | none | any | Details for codeatlas_viz-0.9.3-py3-none-any.whl |
Total release size: 258.8 kB
Release files / codeatlas_viz-0.9.3.tar.gz
| Download URL | codeatlas_viz-0.9.3.tar.gz |
|---|---|
| Size | 139.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bf23d3e4c8fa90c06ce60b271a1c7e5ca953474714f21241d2d60e1cd45c7b9
|
|
BLAKE2b-256 checksum How to use checksums |
5a91f345e3d3e25a4a822e1478805f8b4ac424585f7f4ce492d84439187038ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / codeatlas_viz-0.9.3-py3-none-any.whl
| Download URL | codeatlas_viz-0.9.3-py3-none-any.whl |
|---|---|
| Size | 119.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df0d56fa1d252223171901f4d1f89595f110ea66da08717ad5d899b2047daca6
|
|
BLAKE2b-256 checksum How to use checksums |
531a6a6b42454195b2d48b3559be269e075f9f737b54d2b317d0e6864024e368
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for codeatlas-viz 0.9.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for codeatlas_viz-0.9.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.