A Python CLI tool for filtering Minecraft modpacks to create server-compatible mod sets. It supports both local directory processing and direct Modrinth modpack integration.
Ensure Python 3.8+ is installed. Install dependencies:
pip install -r requirements.txtThe tool operates in two modes: Local and Modrinth.
Process a local directory of mods:
python server_pack_builder.py --source /path/to/mods --destination /path/to/server_modsDownload and filter a Modrinth modpack directly from a URL or slug:
# Download latest version
python server_pack_builder.py --modrinth-url https://modrinth.com/modpack/fabric-boosted
# Download specific version
python server_pack_builder.py --modrinth-url fabric-boosted --pack-version "1.2.3"Launch the graphical user interface for an easy-to-use experience:
python server_pack_builder.py --gui--dry-run: Simulate the process without copying or writing files.--verbose,-v: Enable verbose logging.
--source,-s: Path to the source 'mods' directory.--destination,-d: Path to the destination 'mods' directory.
--modrinth-url,-m: Modrinth Modpack URL or Slug.--pack-version: Specific version ID or Number to download (overrides latest).--output-file,-o: Output path for the generated.mrpack(optional, defaults to{PackName}-server.mrpack).
- Client-Side Filtering: Automatically detects and removes client-only mods by inspecting JAR metadata.
- Modrinth Integration: Downloads, filters, and repacks
.mrpackfiles. - Modrinth Search: Search for modpacks and view their details/logos within the GUI.
- Version Selection: Choose between the latest release or specific versions of a modpack.
- Multi-Loader Support: Works with Fabric and Forge mod loaders.
- Overrides Preservation: Keeps configuration and other data from the modpack's
overridesfolder.
For linting and testing:
python -m black . && python -m isort . && python -m flake8 . && python -m mypy .
python -m pytest

