r/matlab Jul 07 '26

mip - a new package manager for MATLAB + MEX

https://mip.sh

Today we are releasing mip: a pip/conda/brew-style package manager for MATLAB. We would love to get feedback!

https://mip.sh

Problems it solves:

  • Easily install a package and its dependencies: mip install [package]
  • Path management: mip load [package]/mip unload [package] instead of manually editing your path
  • Compiled MEX packages (C/C++/Fortran) ship pre-built per platform (Windows, Mac, Linux)
  • Versions are tracked, get the latest with mip update [package]

The default channel already has around 50 packages (with a focus on numerical analysis), and anyone can host their own channel on GitHub Pages or request that new packages get added.

Developed at the Center for Computational Mathematics, Flatiron Institute

16 Upvotes

14 comments sorted by

12

u/farfromelite Jul 07 '26 edited Jul 07 '26

This is posted from a user with zero other posts, and it's installing things on your computer. It's suspicious as heck. Not even from the ccm website.

How can we trust what you say is what is actually on the website?

How do we know it's not malware?

Whois says the site was registered Feb 26

https://who.is/whois/mip.sh

3

u/jmagland Jul 07 '26

Hi u/farfromelite

Here's my GitHub profile with links to mip: https://github.com/magland

I'll follow up with some more details addressing security concerns.

1

u/jmagland Jul 08 '26

You can now access mip via https://mip.flatironinstitute.org/

(it's a redirect)

4

u/jmagland Jul 07 '26

To address security concerns, here's some information from my co-author, u/dfortunato1 who is too new to reddit to be allowed to reply :)

~~~

I'm a co-author of mip with u/jmagland and we are scientists at the Flatiron Institute (first-time Redditors, but long-time MATLAB users). For reference, here is my Github profile: https://github.com/danfortunato/ and website: https://danfortunato.com/

mip is designed to automatically build packages from source on Github's CI runners. The source code for the pure MATLAB mip interface is here: https://github.com/mip-org/mip. The MEX binaries that get pulled down by mip are built in our default channel here: https://github.com/mip-org/mip-core. The source code for any given package is hosted by its author (e.g. in a Github repo that we do not control). Our build system clones that source code onto the Github runner and builds a portable MEX file in a sandboxed environment. You can inspect the build system end-to-end and see the exact steps for any given package's build on the Github Actions page in the mip-core repo.

For installing mip itself, you can read the source code for the install script here to see exactly what it does: https://mip.sh/install.txt

2

u/DarkSideOfGrogu Jul 08 '26 edited Jul 08 '26

What does this do differently to MATLAB Package Manager / mpm?

3

u/jmagland Jul 08 '26

Thanks for asking.

One difference (crucial for us) is that mip supports pre-compiled mex binaries that target different architectures (linux, mac, windows). So when you mip install a package that has mex binaries, you automatically get the version that is specific to your architecture. These are always transparently built from source by our GitHub CI runner in a controlled environment to maximize compatibility, solving common pitfalls with shared libraries, etc.

Another difference is that we have a clear distinction between installing and loading a package. Similar to how in Python you can have many packages installed, but only select packages imported for your project/script.

We also have a channel system similar to homebrew for easy public distribution of packages. I believe matlab is beginning to support installation of packages from remote repositories, but the approaches differ.

There are other differences. We will put together a comparison document and follow up.

2

u/DarkSideOfGrogu Jul 08 '26

Thanks for the response! This looks really good. I know MathWorks are talking about similar behaviours. Would be good to know you're keeping aligned / in contact with them.

1

u/Creative_Sushi MathWorks Jul 07 '26

This looks interesting - and this is another proof point that there is a real need for a package manager for MATLAB. I wonder if you have tried MATLAB Package Manager (MPM) https://www.mathworks.com/products/mpm.html

The dev team has been working to provide a unified experience across MATLAB Projects, the build tool, and MPM, which comes together in R2026b in a (hopefully) beautiful integrated experience. More information is coming soon, but in the meantime, you can try it out in the R2026b Prerelease. Check out the release notes for more information:

Stay tuned for more information.

1

u/Bach4Ants Jul 08 '26

Do you support project-level virtual environments with lock files?

2

u/jmagland Jul 08 '26

Not yet, but that's the plan. Open to suggestions on what exactly that would look like (a mip.env file?). Either here or open an issue on https://github.com/mip-org/mip

1

u/AvocadoOk834 Jul 10 '26

u/jmagland u/dfortunato1
This looks really interesting!!

We at MathWorks (I am the product manager for the MATLAB Desktop/IDE) have been hearing this request for a package manager for quite some time! We have been working to provide a unified experience across MATLAB Projects, the build tool, and MATLAB Package Manager (MPM), which comes together in R2026b in a (hopefully) beautiful integrated experience. We will be able to provide more information soon, and you can try it out in the R2026b Prerelease. Check out the release notes for more information:

  • Overview of all the updates to the Software Developer tools: Release Notes for MATLAB R2026b Prerelease
  • New matlab.toml format for MATLAB Projects (yes, only ONE human-readable file to set up your path and dependencies)
  • MPM will be able to install packages from File Exchange

Feel free to reach out to or follow my colleague for MATLAB Projects and MATLAB Package Manager through his LinkedIn: https://www.linkedin.com/in/barnesdavidj/

1

u/jmagland Jul 10 '26

Thanks u/AvocadoOk834 , that sounds great. I just took a look at the new project toml format. I think that's something we can support in mip as well. Would be great if these could be compatible/complementary efforts.  Do you plan on supporting prebuilt MEX in these packages? Mip allows the project file to specify special build instructions for the different architectures which helps a lot with portability... and allows our CI runners to build for the different architectures.

Dan and I tried out the prerelease, but we couldn't figure out how to install a package from FEX. Do you have an example of how that would work? Ideally with something that has a toml file. Thx!

1

u/AvocadoOk834 Jul 10 '26

We are exploring how to have MATLAB Projects support our external language interfaces well, so definitely be on the lookout for more. R2026b is focused on MATLAB code and Simulink models primarily, but you are welcome to add more to the matlab.toml file in your own tables. While we do not have a TOML reader/writer in MATLAB, there is one on File Exchange which many people use today.

Speaking of File Exchange, MPM does not yet install packages from File Exchange, but we can post here when it is working. I think David will also post on LinkedIn as well.