Skip to main content

ArchView

See your codebase. Understand it. Then change it.

ArchView gives you a live, interactive map of any Python project's architecture — right in your browser. It parses real Python (via AST, not regex) and follows references into shell scripts and config files, watches for changes, and updates the graph in real time.

Built for developers who vibe-code and need to stay oriented, or anyone inheriting a codebase they didn't write.

ArchView overview — live dependency graph updating as code changes

Drawing annotations — sketching boxes and labels directly on the graph

Why

You're 200 files deep in someone else's project. Or you're building fast and your own code is getting tangled. You need to see the structure — what depends on what, where the entry points are, which modules are isolated.

ArchView shows you all of that in seconds, and keeps updating as you code.

Install

pip install archview

Available on PyPI. Pure Python, works anywhere with Python 3.9+.

Usage

archview /path/to/your/project

Open http://localhost:8080 — that's it. If 8080 is taken, ArchView scans the next 100 ports and prints the one it picked.

# Custom port and refresh interval
archview /path/to/project --port 9000 --interval 5

Tip: point ArchView at your project's import root — the directory your code imports relative to. An edge is only drawn when an import resolves to a file inside the scanned tree, so from a import x connects only if a.py sits at the root you scanned. Scan a parent folder and those absolute imports won't resolve (the modules show up, just without arrows).

What you see

Color Meaning
Green Entry point — modules that import but aren't imported
Blue Connector — modules that both import and are imported
Red Utility — leaf modules only imported by others
Gray Isolated — no import relationships
Red (bright) Error — files that failed to parse

Features

Live refresh

Edit your code, save — the graph updates automatically. No restart needed.

Interactive exploration

  • Hover a node to see its docstring, type, and exported symbols
  • Click a node to highlight its direct dependencies
  • Double-click to open the file in VS Code
  • Drag nodes to rearrange the layout
  • Click folders to collapse/expand entire packages

Dependency highlighting

Click a node and it plus its direct dependencies light up — everything else fades. Then hover a highlighted edge to see exactly which symbols are imported across it.

Annotations

Sketch directly on the graph to explain it. Draw boxes, add text labels, erase — useful for walking a teammate through the architecture or marking up a review. Annotations persist across launches.

Export

  • PNG — screenshot the current view
  • Save — persist node positions (restored on next launch)

Ignore patterns

# Exclude directories from analysis
archview ignore tests __pycache__ venv

# List current patterns
archview ignore --list

# Remove a pattern
archview ignore --remove tests

Patterns match any path segment or a file's stem (so tests hides tests/ and tests.py). Add a trailing slash to match a directory only — build/ ignores the build/ folder but keeps a file named build.py. The defaults (build/, dist/, venv/, __pycache__/, …) are all directory-anchored.

How it works

  1. Collects source files — .py, plus .sh scripts and config files (.yaml/.json) — git-aware, respects .archviewignore
  2. Parses Python via AST (imports, functions, classes); resolves shell-script and config references too
  3. Builds a dependency graph with classified nodes
  4. Renders it with Cytoscape.js + Dagre layout
  5. Watches for changes and re-generates every N seconds

Zero dependencies — pure Python stdlib. The frontend ships bundled.

Example

Try it on the example project (hosted on GitHub):

git clone https://github.com/lm17918/archview.git archview-demo
cd archview-demo
pip install archview
archview examples

License

MIT

Metadata

Release files for archview 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for archview 0.2.7
File Size Uploaded Provenance Actions
archview-0.2.7.tar.gz 222.2 kB Without provenance Details for archview-0.2.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for archview 0.2.7
File Interpreter ABI Platform Actions
archview-0.2.7-py3-none-any.whl Python 3 none any Details for archview-0.2.7-py3-none-any.whl

Total release size: 449.0 kB

Release files / archview-0.2.7.tar.gz

Download URL archview-0.2.7.tar.gz
Size 222.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9f1984845b779628aa18df61f8d39f66d3523dd4f20254bda78f5f860b56003c
BLAKE2b-256 checksum
How to use checksums
b9fb8e47822955883370cc5f9abd5088db24a1f8d21a1495dadeb730cc44503b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / archview-0.2.7-py3-none-any.whl

Download URL archview-0.2.7-py3-none-any.whl
Size 226.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b419befb328ac099fee7ed6fee72a87d2dabeb3b53811e96f8f5ca5b6be2104b
BLAKE2b-256 checksum
How to use checksums
bde197401c226c212baf86bf8251e97462d26d680c76a3ddcb3ff70139bb82db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for archview 0.2.7

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page