Metadata-Version: 2.4
Name: repoarch
Version: 0.1.0
Summary: Turn any codebase into beautiful architecture diagrams — one command, no AI, no server, runs on any laptop.
Author: dsk-dev-ai
Maintainer: dsk-dev-ai
License: MIT
Project-URL: Homepage, https://github.com/dsk-dev-ai/repoarch
Project-URL: Source, https://github.com/dsk-dev-ai/repoarch
Project-URL: Issues, https://github.com/dsk-dev-ai/repoarch/issues
Keywords: architecture,diagram,mermaid,cli,code-visualization,developer-tools,local-first,no-dependency
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

<p align="center">
  <img src="https://img.shields.io/badge/dependencies-ZERO-22c55e?style=flat-square" alt="zero deps">
  <img src="https://img.shields.io/badge/no%20AI-local-green?style=flat-square" alt="no ai">
  <img src="https://img.shields.io/badge/no%20server-offline-7C3AED?style=flat-square" alt="no server">
  <img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="MIT">
  <img src="https://img.shields.io/pypi/pyversions/repoarch?style=flat-square" alt="python">
  <a href="https://github.com/sponsors/dsk-dev-ai"><img src="https://img.shields.io/badge/sponsor-❤️-ea4aaa?style=flat-square" alt="sponsor"></a>
</p>

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

<p align="center">
  <em>↓ generated from the <code>sample/</code> project in this repo, in < 1 second ↓</em>
</p>

<p align="center">
  <img src="docs/demo.svg" alt="repoarch generated architecture diagram" width="720">
</p>

---

## ✨ 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

```bash
# one line, no dependencies
pip install repoarch
```

Or run without installing anything:

```bash
# 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.

```bash
# 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:

```text
Use repoarch to map this repository's architecture.
```

## 🚀 Quick start

```bash
# 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) |
| `architecture.mmd` | Raw [Mermaid](https://mermaid.js.org) source |

## 🛠️ Options

```bash
repoarch path [-o OUTPUT] [--name TITLE] [--min-degree N]
```

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

## 🧠 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#

## 🤝 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](https://github.com/sponsors/dsk-dev-ai) — every bit helps keep it free forever.

<table>
  <tr>
    <td align="center">
      <a href="https://github.com/sponsors/dsk-dev-ai"><img src="https://img.shields.io/badge/❤️%20Become%20a%20sponsor-ea4aaa?style=for-the-badge" alt="Sponsor repoarch"></a><br/>
      <sub>Support free, local-first dev tools</sub>
    </td>
  </tr>
</table>

> Want to sponsor repoarch or list your product here? [Open an issue](https://github.com/dsk-dev-ai/repoarch/issues).

## ⭐ Support

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

## 📄 License

[MIT](LICENSE) — free to use, modify, and distribute.
