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 ↓
✨ 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
- Scan — walks the folder, skips
.git,node_modules,venv, and other noise. - Classify — detects the language of every source file by extension.
- Extract — parses
import/require/usingstatements per language (regex, stdlib only). - Group — maps files to top-level components.
- Score — ranks components by how central they are to the system.
- 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.
|
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb21140f78a43e88055f50eac33b92266118cdc4c9f70b2fc0e34c6ae99b0984
|
|
| MD5 |
cbc032c008f86a2f7c8be29f7870c742
|
|
| BLAKE2b-256 |
f34fda974b887283b3b6be9493c00e854b0bf4fb82706feb515739191900bc77
|
Provenance
The following attestation bundles were made for repoarch-1.0.0.tar.gz:
Publisher:
publish.yml on dsk-dev-ai/repoarch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repoarch-1.0.0.tar.gz -
Subject digest:
eb21140f78a43e88055f50eac33b92266118cdc4c9f70b2fc0e34c6ae99b0984 - Sigstore transparency entry: 2655323406
- Sigstore integration time:
-
Permalink:
dsk-dev-ai/repoarch@2b3aa2dbc2b8655168a603c631dc430309f70d21 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/dsk-dev-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2b3aa2dbc2b8655168a603c631dc430309f70d21 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b17cb028aad520a1699f808f1229311ac5e5d669d956c98ff0402935dcc7222
|
|
| MD5 |
67be49a766d193cdd2debf22c985ca7c
|
|
| BLAKE2b-256 |
a5bef1ad8b252647a1b9d8204b71d808a5c4f964c0fb5f2d2f8b0828c9b78e58
|
Provenance
The following attestation bundles were made for repoarch-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on dsk-dev-ai/repoarch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
repoarch-1.0.0-py3-none-any.whl -
Subject digest:
3b17cb028aad520a1699f808f1229311ac5e5d669d956c98ff0402935dcc7222 - Sigstore transparency entry: 2655323423
- Sigstore integration time:
-
Permalink:
dsk-dev-ai/repoarch@2b3aa2dbc2b8655168a603c631dc430309f70d21 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/dsk-dev-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2b3aa2dbc2b8655168a603c631dc430309f70d21 -
Trigger Event:
push
-
Statement type: