Skip to content

A simple Python CLI Project Manager for Minecraft and Modrinth (mod, resource packs, shaders, datapacks)

License

Notifications You must be signed in to change notification settings

un-pogaz/MC-Modrinth-Project-Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcsmp logoSimple Modrinth Project Manager for Minecraft

mcsmp is a light CLI project manager that gets mods and resourcepacks from Modrinth. One of it's strengths is that it can handle multiple folders, and support a large type of project (mod, resource packs, shader, datapack).
mcsmp use the packages requests as dependencies.

mcsmp is inspire by Fxomt-III/Minecraft-package-manager.

Setup:
First, install Minecraft with your favorite laucher.
Second, install the mod loader that you use.
Then, install the python script in the folder of your choice.

After installing mcsmp, you have to define a .minecraft folder to manage.
To add this, use this command:

mcsmp directory_add <DIRECTORY_NAME> <PATH TO THE .MINECRAFT FOLDER>

Once directory are defined, you have to set the Minecraft version assosiated to it, as well as the mod loader used.

mcsmp version <DIRECTORY_NAME> <VERSION_ID>
mcsmp loader <DIRECTORY_NAME> <LOADER_NAME>

You can display the defined directorys with the command:

mcsmp list

When a directory is defined, you can manage it with the other commands.

To install a project, use this command:

mcsmp install <DIRECTORY_NAME> <PROJECT>

To instal a project, you need to recover and use its slug-name.
The slug-name is usually the name of the project you are looking for, in lower case and with hyphens (-) instead of space. For example "Sodium" and "Sodium Extra" have respectively the slug-name sodium and sodium-extra.
But this is not always the case! For example, the "Iris Shaders" has as slug-name iris and not iris-shaders. One way to get the slug-name of a project is to regad its name in the modrinth link: https://modrinth.com/mod/iris. This is sometimes more devious as FerriteCore where the slug-name is ferrite-core. Caution is therefore required.
If the project has dependencies, these will also be installed.
Note, to update a project you just have to do this command again.


You can shows the installed projects:

mcsmp list <DIRECTORY_NAME>

Check if a specific project is installed:

mcsmp check <DIRECTORY_NAME> <PROJECT>

Eventualy, enabled or disabled:

mcsmp enable <DIRECTORY_NAME> <PROJECT>
mcsmp disable <DIRECTORY_NAME> <PROJECT>

(This will add, or remove, a ".disabled" string at the end of the project file, so that it will not be loaded by Minecraft, but it will still be possible to use the mcsmp commands on this project)

And removing a project:

mcsmp uninstall <DIRECTORY_NAME> <PROJECT>

A key feature is the possibility to update all the projects in a directory with a simple command:

mcsmp update <DIRECTORY_NAME>

Also, you can shows the info about a project:

mcsmp info <PROJECT>

The api print the json of a Modrinth-API request in the terminal. Useful for debugging:

mcsmp api URL [-- PARAMS ...]

The last command is to clear the cache, or just some specific files in the cache:

mcsmp clear-cache [FILE ...]

examples:

mcsmp directory_add fabric-1.18.2 C:\Users\ME\AppData\Roaming\.minecraft
mcsmp check fabric-1.18.2 sodium
mcsmp install fabric-1.18.2 sodium
mcsmp install fabric-1.18.2 sodium-extra
mcsmp install fabric-1.18.2 indium
mcsmp install fabric-1.18.2 lithium
mcsmp install fabric-1.18.2 phosphor
mcsmp install fabric-1.18.2 ferrite-core
mcsmp list fabric-1.18.2
mcsmp info sodium

To use mcsmp with datapacks, you must also specify the world you targeting by adding its folder name at the end of the command. Commands that can support the "world last argument" for datapack are: list, check, install, enable, disable, uninstall, update
examples, with the world "New Start":

mcsmp check fabric-1.18.2 rpgtitles "New Start"
mcsmp install fabric-1.18.2 rpgtitles "New Start"
mcsmp install fabric-1.18.2 gm4-bat-grenades "New Start"
mcsmp disable fabric-1.18.2 gm4-bat-grenades "New Start"
mcsmp uninstall fabric-1.18.2 gm4-bat-grenades "New Start"
mcsmp list fabric-1.18.2 "New Start"
mcsmp update fabric-1.18.2 "New Start"

The mcsmp.bat and mcsmp.sh are little bash to facilitating the use and execution of many commands.