Skip to main content

zero deps no ai no server MIT python pypi version CI sponsor

repoarch 🗺️

Turn any codebase into beautiful architecture diagrams — one command, no AI, no server, runs on any laptop.

Drop in a folder, get a clean, shareable architecture map. Zero dependencies. Pure Python stdlib. Works offline on a Raspberry Pi, a 2015 laptop, or a cloud VM — Mermaid + self-contained HTML that opens in any browser.

↓ generated from the sample/ project in this repo, in < 1 second ↓

repoarch generated architecture diagram


✨ Features

🗂️ 4 output formats interactive HTML, Mermaid .mmd, Graphviz .dot, structured JSON
🌍 14 languages Python · Go · JS/TS · Java · Rust · Ruby · PHP · C/C++ · C# · Kotlin · Swift · Dart
📊 Graph metrics density, average degree, and core/backbone component ranking
⚙️ Config file .repoarch for repeatable, project-specific runs
🔍 Smart scanning gitignore-aware, --exclude, --lang, --min-degree filters
🎛️ Flow control LR / TB / RL / BT layout, plus live edit + fullscreen in HTML
🤖 Agent-ready installs as a skill for Cursor, Claude Code, Codex, and OpenCode
💸 100% free zero dependencies, no AI, no server, no API keys, runs on any laptop

✨ Why repoarch

  • No AI. No API keys. No paid services. Runs offline forever — your code never leaves your machine.
  • No server. Output is a single self-contained HTML file you can email, open, or host anywhere.
  • Zero dependencies. Pure Python standard library — installs in literally one command, works everywhere.
  • Any language. Python, Go, JS/TS, Java, Rust, Ruby, PHP, C/C++, C# — detected automatically.
  • Instant. Scans and renders a project in under a second.
  • Agent-friendly. Works great as a tool for Cursor, Claude Code, Codex, and OpenCode.

🔧 Install

# one line, no dependencies
pip install repoarch

Or run without installing anything:

# clone this repo, then:
python -m repoarch /path/to/your/codebase

🤖 Agent skill (Cursor · Claude Code · Codex · OpenCode)

Works as a first-class skill in your favorite AI coding agent — ask it to "map this repo" and get a verified architecture diagram.

# one-command install for all agents (or: cli, cursor, claude, codex, opencode)
./install.sh all

# or use archify-style agent skill install
npx skills add dsk-dev-ai/repoarch

Then just tell your agent:

Use repoarch to map this repository's architecture.

🚀 Quick start

# generate diagrams for any folder
repoarch /path/to/codebase -o out/

# open the result in your browser
open out/architecture.html          # macOS
xdg-open out/architecture.html      # Linux
start out/architecture.html         # Windows

Output:

File What it is
architecture.html Interactive, self-contained diagram (dark/light, zoom, live edit)
architecture.mmd Raw Mermaid source
architecture.dot Graphviz dot source for external tools
architecture.json Structured component / edge / metric metadata

🛠️ Options

repoarch path [options]
Flag Description
-o, --output Where to write the files (default: .)
--name Custom diagram title (default: folder name)
--min-degree N Hide low-importance components to declutter large projects
-x, --exclude Path(s) to exclude (repeatable), e.g. -x tests -x docs
--lang Only include these languages (repeatable), e.g. --lang python --lang go
-d, --direction Flow direction: LR (default), TB, RL, BT
--format Outputs to write: all (default), html, mmd, json, dot
-c, --config Path to a .repoarch config file (auto-detected by default)
--no-gitignore Do not honor .gitignore during the scan
--json Write architecture.json metadata (implied by --format json/all)
--version Print version and exit

Example

# plot only Python + Go, left-to-right, include metrics
repoarch ./myapp -o out --lang python --lang go -d LR --format all

# use a config file, declutter
repoarch ./bigrepo -c .repoarch --min-degree 2

🧠 How it works

  1. Scan — walks the folder, skips .git, node_modules, venv, and other noise.
  2. Classify — detects the language of every source file by extension.
  3. Extract — parses import / require / using statements per language (regex, stdlib only).
  4. Group — maps files to top-level components.
  5. Score — ranks components by how central they are to the system.
  6. Render — emits Mermaid + a self-contained HTML viewer.

🗺️ Language support

Python · Go · JavaScript · TypeScript · Java · Rust · Ruby · PHP · C · C++ · C# · Kotlin · Swift · Dart

📊 Metrics

With --format all or --json, repoarch reports graph metrics in architecture.json:

  • Density — how connected the module graph is
  • Average degree — mean in/out edges per component
  • Core components — the modules with the most relationships (your real architecture backbone)
  • Top components — ranked by importance

🤝 Contributing

Issues, pull requests, and real-world diagrams are welcome. Want to add a language? It's one entry in repoarch/parser.py.

❤️ Sponsors

repoarch is free, open source, and has zero dependencies and zero running costs to stay that way. If it saves you time, consider sponsoring the project — every bit helps keep it free forever.

Sponsor repoarch
Support free, local-first dev tools

Want to sponsor repoarch or list your product here? Open an issue.

⭐ Support

If repoarch saved you an hour of diagram-drawing, give it a star ⭐ — it helps more developers find it.

📄 License

MIT — free to use, modify, and distribute.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repoarch-1.0.0.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repoarch-1.0.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file repoarch-1.0.0.tar.gz.

File metadata

  • Download URL: repoarch-1.0.0.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for repoarch-1.0.0.tar.gz
Algorithm Hash digest
SHA256 eb21140f78a43e88055f50eac33b92266118cdc4c9f70b2fc0e34c6ae99b0984
MD5 cbc032c008f86a2f7c8be29f7870c742
BLAKE2b-256 f34fda974b887283b3b6be9493c00e854b0bf4fb82706feb515739191900bc77

See more details on using hashes here.

Provenance

The following attestation bundles were made for repoarch-1.0.0.tar.gz:

Publisher: publish.yml on dsk-dev-ai/repoarch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file repoarch-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: repoarch-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for repoarch-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3b17cb028aad520a1699f808f1229311ac5e5d669d956c98ff0402935dcc7222
MD5 67be49a766d193cdd2debf22c985ca7c
BLAKE2b-256 a5bef1ad8b252647a1b9d8204b71d808a5c4f964c0fb5f2d2f8b0828c9b78e58

See more details on using hashes here.

Provenance

The following attestation bundles were made for repoarch-1.0.0-py3-none-any.whl:

Publisher: publish.yml on dsk-dev-ai/repoarch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

0.1.0

2 files

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