juraj-hrivnak / Pakku

A multiplatform modpack manager for Minecraft: Java Edition. Create modpacks for CurseForge, Modrinth or both simultaneously.
https://juraj-hrivnak.github.io/Pakku/
European Union Public License 1.2
30 stars 4 forks source link

`sync` command #56

Open Xikaro opened 1 month ago

Xikaro commented 1 month ago

Is there a planned function, something like the "refresh" command? When the folder mods already contains mod changes, i.e. updated manually or via the launcher, and pakku updated them in pakku-lock.json, based on the file name and version, if the version has changed Screenshot_162

Xikaro commented 1 month ago

For example, like packwiz https://packwiz.infra.link/tutorials/creating/getting-started/ "packwiz refresh"

https://github.com/packwiz/packwiz/blob/main/cmd/refresh.go

juraj-hrivnak commented 1 month ago

The sync command could detect the project files in your modpack add ask you whether you want to update, add (or remove?) projects from the lock file.

Also a watch command could be useful to detect these things and sync automatically, but also hard to implement properly.

Under the hood, there are already functions in the Pakku API to do that. You can use a sha1 hash for Modrinth and a Murmur2 hast for CurseForge, to get a project.