-
Notifications
You must be signed in to change notification settings - Fork 1
Core Specification
Minecraft Package Manager (mpm) is a package manager designed to assist with installation and configuration tasks that arise in modded Minecraft.
MPM can be divided into two halves - a back end, implemented as a library, and one or more front ends utilizing the library that the user interacts with. For our first iteration we will be using a simple CLI (command line interface) that users can interact with, in a fashion similar to pacman, apt-get, or npm. In the future we may design a GUI, web interface, or automated tool as additional front ends.
Primarily, mpm deals with the installation, removal, upgrading and downgrading of packages. Typically, each mod will consist of one or more packages that the user will install. An individual version of a package is called a build, which contains information not applicable to all versions of a package.
By default, an installation of MPM comes with mpm, a front-end to MPM that can be interacted with via a shell or command prompt.
On Linux, you can run mpm by typing the following in a shell of your choice:
mpm command
On Windows, you can run mpm by typing the following into a command prompt:
mpm.exe command
On all commands which may be given an instance parameter, a path may be substituted. If the current directory or one of its parents is an instance, it will be chosen as the default for the instance argument unless overridden. The user may use an instance by name in order to register it as the default instance to affect from any non-mpm directory, but such an instance must be registered with mpm via integrate in order to support this.
The following options are valid commands:
init [--arch=latest] [--side=client] [--platform=current] [instancePath=.]
- Creates a new instance
register [--name=<arch+side(e.g. 1.8client)>] [instancePath=.]
- Loads an instance into the working set
deregister [--name=<arch+side(e.g. 1.8client)>] [instancePath=.]
- Unloads an instance from the working set
deinit [instanceName]
- Destroys an instance and removes it from the working set, requires an exact instance name and confirmation
install [--instance=instanceName || -i instanceName] <packageName> [... || --version=(semver)]
- Install a package at its newest compatible or specified version, or install multiple packages at their newest compatible versions
uninstall [--instance=instanceName || -i instanceName] <packageName> [...]
- Uninstall one or more packages
purge [--instance=instanceName || -i instanceName] <packageName> [...]
- Uninstall one or more packages and remove their configuration files
update / sync
- Refresh the cache of repository information on packages
upgrade [--instance=instanceName || -i instanceName] [packageName] [... || --version=(semver)]
- Updates a package to its newest or the specified version, or upgrade multiple packages to their newest versions
dist-upgrade [--instance=instanceName || -i instanceName] arch
- Updates all packages to the specified arch