Metadata-Version: 2.4
Name: analyview
Version: 0.1.2
Summary: Interactive Django architecture analyzer
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: typer
Requires-Dist: rich
Requires-Dist: fastapi
Requires-Dist: uvicorn
Requires-Dist: networkx
Requires-Dist: jinja2
Requires-Dist: beautifulsoup4
Requires-Dist: watchdog

# AnalyView

**AnalyView** is a command-line tool that scans a Python/Django project and gives you an interactive visual overview of its structure — Python files, HTML templates, and Django apps — right in your browser.

Point it at a project folder and get an instant snapshot of what's inside, no configuration needed.

---

## Installation

```bash
pip install analyview
```

Requires Python 3.9+.

---

## Commands

### `analyview scan`

Scans a project directory and prints a summary to the terminal.

```bash
analyview scan .
```

Or point it at any folder:

```bash
analyview scan D:\git\MyProject
```

**What it reports:**
- Total number of Python (`.py`) files found
- Total number of HTML template files found
- Detected Django apps (folders containing both `models.py` and `views.py`)

The scan automatically skips virtual environments, `node_modules`, `.git`, build folders, and broken symlinks — so it's safe to run on any real-world project without manual cleanup.

---

### `analyview serve`

Launches a local web app so you can explore the project's structure visually instead of just reading a terminal summary.

```bash
analyview serve .
```

This starts a server (default: `http://127.0.0.1:9001`) — open the printed URL in your browser to view the interactive layout of your project.

**Optional flags:**

| Flag | Description | Default |
|------|-------------|---------|
| `--host` | Host address to bind to | `127.0.0.1` |
| `--port` | Port to serve on | `9001` |

Example with custom host/port:

```bash
analyview serve . --host 0.0.0.0 --port 9002
```

Press `Ctrl+C` to stop the server.

---

## What counts as a "Django app"?

AnalyView uses a simple, reliable heuristic: any directory that contains **both** a `models.py` and a `views.py` file is treated as a Django app. This works without needing your project's settings, installed apps list, or any Django-specific configuration.

---

## Notes

- Works on any Python project, not just Django ones — non-Django projects will simply show `0` Django apps.
- Safe on Windows, including projects with virtual environments that use symlinks/junctions (a common source of crashes in other scanning tools).
- No internet connection or external services required — everything runs locally.

---

