MATLAB and Simulink driver for sim-cli, distributed as a plugin
Project description
sim-plugin-matlab
MATLAB and Simulink driver for sim-cli, distributed as a plugin via Python entry_points.
This plugin delegates to MathWorks' matlabengine package and the local MATLAB
binary. It does not bundle MATLAB or any MathWorks SDK. See
LICENSE-NOTICE.md.
Other optional agent toolkits can be combined with this plugin depending on
your local environment and task. For example, if your agent environment already
has MathWorks' MATLAB Agentic Toolkit,
Simulink Agentic Toolkit,
or MATLAB MCP Core Server
available, those tools can be used alongside sim-plugin-matlab.
Install
For agent projects, install sim-cli-core and the MATLAB plugin in the project environment:
uv init # only if this is not already a uv project
uv add sim-cli-core sim-plugin-matlab
uv run sim plugin sync-skills --target .agents/skills --copy
uv run sim check matlab
uv run sim plugin doctor matlab --deep
For local persistent sessions, install the MathWorks engine SDK that matches the MATLAB release installed on your machine (24.1 ↔ R2024a, 24.2 ↔ R2024b, 25.1 ↔ R2025a, 25.2 ↔ R2025b):
uv add matlabengine==24.1
The plugin keeps matlabengine optional because the SDK build itself requires
a matching local MATLAB installation.
For Claude Code, sync the bundled skill to .claude/skills instead:
uv run sim plugin sync-skills --target .claude/skills --copy
uv run sim ... runs sim from this project environment, so it sees this
project's plugins. Without uv, create and activate a venv, then install
sim-cli-core plus this plugin from PyPI with python -m pip.
How it works
The plugin registers via three entry-point groups:
[project.entry-points."sim.drivers"]
matlab = "sim_plugin_matlab:MatlabDriver"
[project.entry-points."sim.skills"]
matlab = "sim_plugin_matlab:skills_dir"
[project.entry-points."sim.plugins"]
matlab = "sim_plugin_matlab:plugin_info"
sim.drivers exposes the driver class, sim.skills exposes the bundled skill
files, and sim.plugins exposes catalogue-style metadata for local discovery.
.m scripts dispatch via matlab -batch "run('<path>')". .slx/.mdl
Simulink models dispatch via load_system → sim_shim.run → close_system,
where +sim_shim/run.m is the MATLAB-side helper bundled under
src/sim_plugin_matlab/matlab_pkg/.
Optional agent toolkits are complementary to this plugin rather than bundled by
it. Agents and users can choose the available tool path that fits the task,
while sim-plugin-matlab continues to provide the sim driver interface.
Develop
git clone https://github.com/svd-ai-lab/sim-plugin-matlab
cd sim-plugin-matlab
uv sync
uv run pytest # unit tests run without MATLAB
SIM_MATLAB_RUN_INTEGRATION=1 uv run pytest tests/test_real_matlab_smoke.py -q
License
Apache-2.0. See LICENSE and LICENSE-NOTICE.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sim_plugin_matlab-0.1.1.tar.gz.
File metadata
- Download URL: sim_plugin_matlab-0.1.1.tar.gz
- Upload date:
- Size: 78.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96c3a55ec383229695ff0e1f3659f8e6a0c57e02172a286384047348eac05bc2
|
|
| MD5 |
78c5db8100652743b2fd66c386bdf6f7
|
|
| BLAKE2b-256 |
b74dc9832b0db17266074b1002b25c75d4a96bf22dd03645581dd7d79793be40
|
File details
Details for the file sim_plugin_matlab-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sim_plugin_matlab-0.1.1-py3-none-any.whl
- Upload date:
- Size: 29.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b793a9409016e9403d96b17e56e104802fc85e8d418cc382fd07489de1e32bee
|
|
| MD5 |
05460a5d68f8d310695bea71aaa139b0
|
|
| BLAKE2b-256 |
cb3cfaeb0511df81fcfcecf92d0a3e8392cb467320fd870e20e532314c8eb6c4
|