Metadata-Version: 2.4
Name: mulesoft-flow-analyzer
Version: 1.1.3
Summary: A tool for analyzing MuleSoft integration projects to generate sequence diagrams or natural language descriptions of each flow
Author-email: Brad McNaughton <hello@bradmcnaughton.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/bradmcnaughton/mulesoft-flow-analyzer
Project-URL: Bug Tracker, https://github.com/bradmcnaughton/mulesoft-flow-analyzer/issues
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: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: xmltodict
Requires-Dist: pyyaml
Requires-Dist: plantweb
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Dynamic: license-file

# Mulesoft Flow Analyzer

A library for analyzing Mulesoft integration projects to generate sequence diagrams or natural language descriptions of each flow.

Before analysis, placeholders in code will attempt to be replaced using values from the property files in the project directory. If there are multiple properties files, you can supply a hierarchy to follow and any omitted properties will not be referenced. This can be helpful if multiple environment property files are in the project.

Depending on your output format, text files and/or diagrams will be generated with file names based on the flow name (with special characters replaced with underscores).

## Installation

Install from [PyPI](https://pypi.org/project/mulesoft-flow-analyzer/):

```bash
pip install mulesoft-flow-analyzer
```

To install a specific version:

```bash
pip install mulesoft-flow-analyzer==1.1.3
```

For development, clone the repository and install in editable mode with test dependencies:

```bash
pip install -e ".[dev]"
```

A CLI that uses this library is available at [mulesoft-flow-analyzer-cli](https://github.com/bradmcnaughton/mulesoft-flow-analyzer-cli).

Maintainers: see [Releasing to PyPI](docs/RELEASING.md).

## Diagram Generation

A PlantUML server is required to generate the diagrams. This can either be run locally or using a public service.

### Running the PlantUML server locally with Docker

No MuleSoft code is required to be sent to a public server, only the generated UML. If you don't want to send the UML to a public server, you can run the PlantUML server locally.

Pull the PlantUML server image:

```bash
docker pull plantuml/plantuml-server
```

Run the PlantUML server. (In this example, the server will be available on port 8087)

```bash
docker run -d -p 8087:8080 plantuml/plantuml-server:jetty
```

Refer to the [Overriding Configuration](#overriding-configuration) section for how to specify the server address and port in the configuration file under analyzer_properties -> plantuml.

Alternatively, use the `-s` argument to specify the server address and port when running the analyzer.

## Overriding Configuration

For detailed configuration options, see [Configuration Documentation](docs/configuration.md).

## Instructions for LLMs

LLMs can be shown the [python usage instructions](docs/python_usage.md) to help them generate code.

## Troubleshooting

If you encounter an error, check the log file for more information. The log file is located at the path specified in the configuration file (default is /tmp/mfa-logs/mule_flow_analyzer.log).

If the log file is not found, check the default properties file for the correct path.

The log level can be set to DEBUG to get more information in the configuration file.
