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.

Metadata

Release files for repoarch 1.0.0

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

Source distribution (sdist)

Source distribution for repoarch 1.0.0
File Size Uploaded Provenance
repoarch-1.0.0.tar.gz 18.6 kB With provenance Details

Built distribution (wheel)

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

Total release size: 35.7 kB

Release files / repoarch-1.0.0.tar.gz

Download URL repoarch-1.0.0.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
eb21140f78a43e88055f50eac33b92266118cdc4c9f70b2fc0e34c6ae99b0984
BLAKE2b-256 checksum
How to use checksums
f34fda974b887283b3b6be9493c00e854b0bf4fb82706feb515739191900bc77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 30, 2026.

Transparency log

Release files / repoarch-1.0.0-py3-none-any.whl

Download URL repoarch-1.0.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b17cb028aad520a1699f808f1229311ac5e5d669d956c98ff0402935dcc7222
BLAKE2b-256 checksum
How to use checksums
a5bef1ad8b252647a1b9d8204b71d808a5c4f964c0fb5f2d2f8b0828c9b78e58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 30, 2026.

Transparency log

Security for repoarch 1.0.0

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for repoarch-1.0.0.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 Aug 30, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

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