{"id":16508712,"url":"https://github.com/mobeets/mpm","last_synced_at":"2025-04-06T02:08:55.750Z","repository":{"id":34731256,"uuid":"38709297","full_name":"mobeets/mpm","owner":"mobeets","description":"Simple Matlab package management inspired by pip","archived":false,"fork":false,"pushed_at":"2024-11-22T14:10:43.000Z","size":214,"stargazers_count":82,"open_issues_count":5,"forks_count":22,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T01:08:13.213Z","etag":null,"topics":["matlab","matlab-library","matlab-package-installer","matlab-path","matlab-toolbox","mpi","mpm","package-control","package-management","package-manager"],"latest_commit_sha":null,"homepage":"http://mobeets.github.io/mpm","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mobeets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-07-07T19:14:39.000Z","updated_at":"2025-02-12T00:08:19.000Z","dependencies_parsed_at":"2023-01-15T08:49:01.979Z","dependency_job_id":"7e9df728-5510-48ae-a339-8d2c54aa3317","html_url":"https://github.com/mobeets/mpm","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobeets%2Fmpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobeets%2Fmpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobeets%2Fmpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mobeets%2Fmpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mobeets","download_url":"https://codeload.github.com/mobeets/mpm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423515,"owners_count":20936626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["matlab","matlab-library","matlab-package-installer","matlab-path","matlab-toolbox","mpi","mpm","package-control","package-management","package-manager"],"created_at":"2024-10-11T15:47:08.102Z","updated_at":"2025-04-06T02:08:55.717Z","avatar_url":"https://github.com/mobeets.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Matlab Package Installer (mpi)\n\n[![View on GitHub](https://img.shields.io/badge/view-repo-blue?logo=github)](https://github.com/mobeets/mpm)\n[![View mpi on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/54548-mpm)\n\n\nA simple package manager for Matlab (inspired by [pip](https://github.com/pypa/pip)). Downloads packages from Matlab Central's File Exchange, GitHub repositories, or any other url pointing to a .zip file.\n\n## Quickstart\n\nDownload/clone this repo and add it to your Matlab path (using `addpath`). Now try the following:\n\n- `mpi install [package-name]`: install package by name\n- `mpi uninstall [package-name]`: remove package, if installed\n- `mpi search [package-name]`: search for package given name (checks Github and Matlab File Exchange)\n- `mpi freeze`: lists all packages currently installed\n- `mpi init`: adds all installed packages to path (run when Matlab starts up)\n\n### What it does\n\nBy default, mpi installs all Matlab packages to the directory `mpi-packages/`. (You can edit `mpi_config.m` to specify a custom default installation directory.)\n\nIf you restart Matlab, you'll want to run `mpi init` to re-add all the folders in the installation directory to your Matlab path. Better yet, just run `mpi init` from your Matlab [startup script](http://www.mathworks.com/help/matlab/ref/startup.html).\n\n## More details\n\n### Install a single package\n\n__Install (searches FileExchange and Github):__\n\n```\n\u003e\u003e mpi install export_fig\n```\n\nWhen installing, mpi checks for a file in the package called `install.m`, which it will run after confirming (or add `--force` to auto-confirm). It also checks for a file called `pathlist.m` which tells it which paths (if any) to add.\n\n__Install a Github release (by tag, branch, or commit)__\n\nBy tag:\n\n```\n\u003e\u003e mpi install matlab2tikz -t 1.0.0\n```\n\nBy branch:\n\n```\n\u003e\u003e mpi install matlab2tikz -t develop\n```\n\nBy commit:\n\n```\n\u003e\u003e mpi install matlab2tikz -t ca56d9f\n```\n\n__Uninstall__\n\n```\n\u003e\u003e mpi uninstall matlab2tikz\n```\n\nWhen uninstalling, mpi checks for a file in the package called `uninstall.m`, which it will run after confirming (or add `--force` to auto-confirm).\n\n__Search without installing:__\n\n```\n\u003e\u003e mpi search export_fig\n```\n\n__Install from a url:__\n\n```\n\u003e\u003e mpi install covidx -u https://www.mathworks.com/matlabcentral/fileexchange/76213-covidx\n```\nOR:\n\n```\n\u003e\u003e mpi install export_fig -u https://github.com/altmany/export_fig.git\n```\n\n(Note that when specifying Github repo urls you must add the '.git' to the url.)\n\n__Install local package:__\n\n```\n\u003e\u003e mpi install my_package -u path/to/package --local\n```\n\nThe above will copy `path/to/package` into the default install directory. To skip the copy, add `-e` to the above command.\n\n__Overwrite existing packages:__\n\n```\n\u003e\u003e mpi install matlab2tikz --force\n```\n\n__Install/uninstall packages in a specific directory:__\n\n```\n\u003e\u003e mpi install matlab2tikz -d /Users/mobeets/mypath\n```\n\nNote that the default installation directory is `mpi-packages/`.\n\n## Environments (\"Collections\")\n\nmpi has rudimentary support for managing collections of packages. To specify which collection to act on, use `-c [collection_name]`. Default collection is \"default\".\n\n```\n\u003e\u003e mpi install cbrewer -c test\nUsing collection \"test\"\nCollecting 'cbrewer'...\n   Found url: https://www.mathworks.com/matlabcentral/fileexchange/58350-cbrewer2?download=true\n   Downloading https://www.mathworks.com/matlabcentral/fileexchange/58350-cbrewer2?download=true...\n\u003e\u003e mpi init -c test\nUsing collection \"test\"\n   Adding to path: /Users/mobeets/code/mpi/mpi-packages/mpi-collections/test/cbrewer\n   Added paths for 1 package(s).\n```\n\n## Installing multiple packages from file\n\n```\n\u003e\u003e mpi install -i /Users/mobeets/example/requirements.txt\n```\n\nSpecifying a requirements file lets you install or search for multiple packages at once. See 'requirements-example.txt' for an example. Make sure to provide an absolute path to the file!\n\nTo automatically confirm installation without being prompted, set `--approve`. Note that this is only available when installing packages from file.\n\n## Moving from `mpm` to `mpi`\n\nmpi was previously known as \"mpm\". (We had to change the name because Matlab started using [\"mpm\"](https://github.com/mathworks-ref-arch/matlab-dockerfile/blob/main/MPM.md) as a way of installing Matlab toolboxes.)\n\nOne way of transitioning from (our) `mpm` to `mpi` is to simply reinstall all packages/collections using `mpi`, which will use the new default installation path in `mpi-packages/`. Alternatively, point `mpi` to the folder containing any previously installed packages by changing `mpi-packages` to `mpm-packages` in `mpi_config.m`.\n\n## Troubleshooting\n\nBecause there's no standard directory structure for a Matlab package, automatically adding paths can get a bit messy. When mpi downloads a package, it adds a single folder within that package to your Matlab path. If there are no `*.m` files in the package's base directory, it looks in folders called 'bin', 'src', 'lib', or 'code' instead. You can specify the name of an internal directory by passing in an `-n` or `internaldir` argument. To install a package without modifying any paths, set `--nopaths`. Or to add _all_ subfolders in a package to the path, set `--allpaths`.\n\nmpi keeps track of the packages it's downloaded in a file called `mpi.mat`, within each installation directory.\n\n__If you are having trouble, please submit an [issue](https://github.com/mobeets/mpm/issues/).__\n\n## Requirements\n\nmpi should work cross-platform on versions Matlab 2014b and later. Also note that, starting with Matlab 2022, you may see a warning when using mpi, as Matlab includes a built-in command of the same name (used for installing Matlab products). You may need to rename the file `mpi.m` to something else, and then rename the function name on line 1 of this file to match, as well as the line containing \"help mpi\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobeets%2Fmpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmobeets%2Fmpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmobeets%2Fmpm/lists"}