Quick start#

Ready to try out Modrinth Package Manager?

Installation#

Releases#

Go to the repositories Release page and download the latest version for your system.

Make sure to rename executable binary file to mpm and place the somewhere in your PATH to make it executable in your shell of choice.

For Linux users:

Make the binary executable by running chmod +x mpm.

Cargo#

Since this project is in its early steps, and we don’t have any automated builds yet, the recommended way of installing the tool is by using cargo.

The recommended way of installing cargo is by using the Rustup Toolchain Installer. Install it as recommended by the steps mentioned at the webpage. As you will be compiling the program by yourself, you will have to install all the dependencies on your own, meaning for Windows, you will also have to install the MVSC toolchain for the Windows development header files. But the Rustup Toolchain Installer will handle everything for you.

After installation, make sure your Paths are set correctly and that you can run cargo in your terminal of choice. If so, install the Modrinth Package Manager by running:

cargo install mpm

This will automatically fetch all the source code and its dependencies, compile and install it onto your machine. After that is done, you should be able to use the command mpm on your machine.

Source Code#

Make sure you have all prerequesites installed:

Clone the repository with

git clone https://codeberg.org/maik-steiger/mpm.git

and run the following command to build your own executable

cargo build -r

Usage#

Use the program to manage your server instances.

Create new project#

Create a new server project by running

mpm new <project name>

and replace the tag <project name> with your project name you would like to use. It will automatically create a new directory with the given project name and a mpm.toml file inside. By default, it will contain very little details, such as the latest Minecraft game version and the vanilla server loader.

Run project#

To run your newly created project, first make sure to cd into your new project by running

cd <project name>

Then start your project by running

mpm run

The program will automatically download the minecraft_server.jar according to your chosen game version. Neat isn’t it? After the program made sure the server is downloaded, it will generate a file, either called start.sh or start.bat (Depending if you are on Windows or Linux) and choose the correct Java version for that server instance, by scanning your system for all Java installations.

Then the program will run that start script for you, redirecting stdin, stderr and stdout, so you won’t notice the package manager running.

Changing game version#

Change the game version your server is running on by modifying the game_version entry in your mpm.toml file. For a complete list of all available game versions, run

mpm list-game-versions

Changing loader#

Change the loader that is used for your server by modifying the loader entry in your mpm.toml file. For a complete list of all available loaders, run

mpm list-loaders

Installing dependencies#

You can also install dependencies (either plugins or mods, depending on your loader), by running

mpm install <dependency 1> <dependency 2> ...

The three dots at the end mean, that you can enter multiple dependencies and install them all at once. Oh and don’t worry about forgetting any dependencies for your dependency, they will be resolved and downloaded all automatically.

If you are not sure how the dependencies are named that you want to download, search for them by running

mpm search <search term>

it will output a list in CSV format, containing the dependency name, dependency description and dependency author. Use the dependency name to install the dependency for your server.

Troubleshooting#

You may notice that not all loaders are fully implemented yet. This is because they are not. The most commonly used loaders luckily work similar, but some have their own way of installation and path management. The program tries to generalize everything by offering a common interface to work with all different kinds of loaders. This is time consuming to implement though and every help is welcome. If you encounter any crashes, please open an issue on the official Repository or even better, open a pull request with code change.