Metadata-Version: 2.4
Name: rhetor
Version: 2.1.0
Summary: A Python library for parsing and solving OPL-like mathematical programming models using multiple solvers.
Author-email: Roberto Rossi <robros@gmail.com>
License: MIT
Project-URL: Homepage, https://gwr3n.github.io/rhetor/
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: sly>=0.5
Requires-Dist: numpy>=1.26
Requires-Dist: scipy>=1.14
Requires-Dist: sympy>=1.14
Requires-Dist: gurobipy>=11.0
Requires-Dist: highspy>=1.11
Requires-Dist: Pillow>=10
Requires-Dist: PyMuPDF>=1.24
Requires-Dist: ttkbootstrap<2,>=1.14
Requires-Dist: platformdirs>=4.1
Requires-Dist: openai>=1.99
Requires-Dist: google-generativeai>=0.8.5
Requires-Dist: google-genai>=1.0.0
Requires-Dist: ollama>=0.6.0
Requires-Dist: tensorflow>=2.16.2
Requires-Dist: sentence-transformers>=5.1.1
Requires-Dist: tf-keras>=2.16.0
Requires-Dist: tiktoken>=0.12.0
Requires-Dist: mcp<2,>=1.28.1
Requires-Dist: networkx>=3.4
Dynamic: license-file

# Rhetor

**GenAI-assisted Integrated Modelling Environment for Mixed-Integer Linear Programming**

Rhetor is an Integrated Modelling Environment for modelling and solving mixed-integer linear programming problems. Rhetor supports a subset of the Optimisation Programming Language (OPL) syntax and it is built on [``pyopl``](https://github.com/gwr3n/pyopl), a Python library for parsing and solving OPL-like mathematical programming models using Gurobi or Scipy (Highs). Rhetor integrates GenAI features to support and automate the modelling process.

![Demo](https://github.com/gwr3n/rhetor/raw/main/sudoku.gif)

## Learn More

- [Project Website](https://gwr3n.github.io/rhetor)
- [Project Repository](https://github.com/gwr3n/rhetor)
- [PyOPL Repository](https://github.com/gwr3n/pyopl)
- [PyOPL User Guide](https://github.com/gwr3n/rhetor/blob/main/docs/PyOPL%20user%20guide.md)
- [Examples Overview](https://github.com/gwr3n/rhetor/blob/main/docs/PyOPL%20examples%20overview.md)
- [Sample PyOPL Models](https://github.com/gwr3n/rhetor/tree/main/opl_models)

## MCP access to the running IDE

When Rhetor is open, the Rhetor MCP server can read and replace the live model
and data editor contents. Add the server to an MCP client such as VS Code or
Claude Desktop using the Python executable from this environment:

```json
{
	"servers": {
		"Rhetor": {
			"type": "stdio",
			"command": "/path/to/venv/bin/python",
			"args": ["-m", "pyopl.rhetor_mcp"]
		}
	}
}
```

Start Rhetor before calling `read_ide_editors_tool` or
`write_ide_editors_tool`. The IDE bridge listens only on the loopback interface
and publishes per-launch connection credentials in the user's Rhetor config
directory. Writing through MCP updates the visible editors and marks the
contents as unsaved.
