Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sim_plugin_matlab-0.1.2.tar.gz (83.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sim_plugin_matlab-0.1.2-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

Details for the file sim_plugin_matlab-0.1.2.tar.gz.

File metadata

  • Download URL: sim_plugin_matlab-0.1.2.tar.gz
  • Upload date:
  • Size: 83.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sim_plugin_matlab-0.1.2.tar.gz
Algorithm Hash digest
SHA256 06d3da40d4678497eeb1921b83cc74a4d4e1395e4028c965abaae4494014b828
MD5 8aae081aa694bd9ee7b797c22a05f7da
BLAKE2b-256 bcd46ad3ece0a7969b859699148046c641599a17c83afc80c278b914a3dbca81

See more details on using hashes here.

File details

Details for the file sim_plugin_matlab-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sim_plugin_matlab-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 32.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sim_plugin_matlab-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 560a57a408876719a6c4d4a582049cb690e1a547f014918cd7519e21d31343ff
MD5 0f4aa262e8e2104f2881d7266044a83e
BLAKE2b-256 2592bdfe604be4773ffbbd36ddafd0031289d13f5ce1fcce36cd738fb4e7e446

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page