Metadata-Version: 2.4
Name: dependaman
Version: 1.2.0
Summary: Understand your Python project's internal structure. Find cycles, dead code, and coupling hotspots — visualized as an interactive HTML graph. Zero external dependencies.
Author-email: Jacobo Bedoya <jacobobedoya@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://jacobitosuperstar.codeberg.page/DependaMan/en/
Project-URL: Repository, https://codeberg.org/jacobitosuperstar/DependaMan
Project-URL: Changelog, https://jacobitosuperstar.codeberg.page/DependaMan/en/changelog/
Project-URL: Software Design, https://jacobitosuperstar.codeberg.page/DependaMan/en/software-design/
Project-URL: Roadmap, https://jacobitosuperstar.codeberg.page/DependaMan/en/roadmap/
Keywords: dependency,analysis,visualization,graph,dead-code,architecture,ast
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# DependaMan

Understand your Python project's internal structure. Find cycles, dead modules,
hotspots, and architecture problems — visualized as an interactive graph.

---

## Installation

```bash
pip install dependaman
```

## Usage

**CLI:**

```bash
dependaman                          # analyze the current directory, open the graph
dependaman /path/to/project         # analyze another project
dependaman --format json -o -       # print the analysis as JSON on stdout
dependaman -o graph.html            # choose the output file
dependaman --no-browser             # write the file, do not open a browser
dependaman --help
```

Point `dependaman` at the directory that _contains_ your top-level package, not
at the package itself — imports are resolved against the package name, so
analyzing `myproject/myproject/` leaves most modules without edges.

| Flag                         | Meaning                                                    |
| ---------------------------- | ---------------------------------------------------------- |
| `path`                       | project root (optional, defaults to the current directory) |
| `-f`, `--format {html,json}` | output format (default: `html`)                            |
| `-o`, `--output-path PATH`   | destination file, or `-` for stdout                        |
| `--no-browser`               | do not open the rendered HTML                              |
| `--version`                  | print the installed version                                |

JSON output is the whole analysis, so it pipes:

```bash
dependaman --format json -o - | jq '.cycles'
```

**Python API:**

```python
from dependaman import dependaman

dependaman()                                    # writes Dependaman.html, opens browser
dependaman("/path/to/project", in_memory=True)  # returns the HTML as a string
dependaman(".", output_format="json", output_path="graph.json") # returns a format correct json file in the output_path
```

Every argument after `path` is keyword-only:

| Argument        | Default  | Meaning                                            |
| --------------- | -------- | -------------------------------------------------- |
| `path`          | `"."`    | project root to analyze                            |
| `output_format` | `"html"` | `"html"` or `"json"`                               |
| `in_memory`     | `False`  | return the rendered text instead of writing a file |
| `output_path`   | `None`   | destination; derived from the format when omitted  |
| `open_browser`  | `True`   | open the written file                              |

With `in_memory=True` nothing is written and `output_path` / `open_browser` are
ignored — useful for serving the graph from a web handler.

---

## Documentation

- [Website](https://jacobitosuperstar.codeberg.page/DependaMan/en/)
- [Software Design](https://jacobitosuperstar.codeberg.page/DependaMan/en/software-design/)
- [Roadmap](https://jacobitosuperstar.codeberg.page/DependaMan/en/roadmap/)
- [Changelog](https://jacobitosuperstar.codeberg.page/DependaMan/en/changelog/)
- [Repository](https://codeberg.org/jacobitosuperstar/DependaMan)
