packctl
packctl updates the modpack on a Minecraft server. It replaces only the files that belong to the pack, leaves everything the owner added alone, and can roll an update back.
Context
A modpack is a large bundle of mods and settings. Server owners add their own mods and tweaks on top, and installing a new version of the pack over that usually wipes them. I run modded servers myself, which is where the tool came from.
What I built
Before it touches anything, packctl works out exactly which files an update will change. It backs those files up, installs the new version, and puts the owner’s own files back on top.
It downloads packs from CurseForge and Modrinth, and can stop and restart the server around an update.
Challenges
Servers Set Up by Hand
Many servers are installed by hand or through a hosting panel, so there is no list of which files came from the pack. packctl adopt compares the server with the pack and remembers which files the owner added, so the next update only replaces what belongs to the pack.