Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modpacker

A tool for managing and packaging Modrinth mod profiles. Automatically filters mods by compatibility (server-only, client-only, or universal) and creates distributable archives.

Features

  • Auto-detects your Modrinth app installation
  • Queries Modrinth API to determine mod compatibility
  • Creates server-only or client-only mod packs
  • Exports as ZIP or TAR archives
  • Configurable compression and output formatting
  • Interactive CLI with real-time progress

Installation

From Source

git clone https://github.com/cybermine2098/Modpacker.git
cd modpacker
npm install
npm start

As a Global Binary

Build a standalone executable that works without Node.js installed:

npm install -g pkg
pkg . --targets node18-linux-x64,node18-macos-x64,node18-win-x64
sudo cp dist/mpcli /usr/local/bin/  # Linux/macOS
# or copy mpcli.exe to a PATH folder on Windows

Then run mpcli from anywhere.

Usage

Basic Usage

npm start

The tool will:

  1. Locate your Modrinth installation
  2. Display available profiles
  3. Open an interactive prompt with these commands:
help                          - Show available commands
server -p [path] -n [name]    - Create server-only mod pack
client -p [path] -n [name]    - Create client-only mod pack
exit                          - Exit without saving

Command Options

  • -p path - Output directory (defaults to ~/Downloads)
  • -n name - Archive filename (defaults to archive-server or archive-client)
  • -t - Use TAR format instead of ZIP
  • -nd - Skip auto-detection, manually specify Modrinth path

Examples

npm start
# Then in the interactive prompt:
server -p ~/backups -n "MyServer"
client -n "MyClient" -t

Configuration

Create or modify the config.json in the project root to customize behavior:

{
  "lineSpacing": { "name": "tabbing", "value": 1,"comment":"..." },
  "distanceMs": { "name": "delay", "value": 100,"comment":"..." },
  "archiveCompression": { "name": "compression", "value": 6,"comment":"..." }
}

Modify settings from the CLI:

mpcli config write archiveCompression 9
mpcli config read

How It Works

  1. Scans your Modrinth profile's mods folder
  2. Calculates SHA1 hash for each mod file
  3. Queries Modrinth API to determine server/client compatibility
  4. Allows you to create filtered archives without manual work

Mods not found on Modrinth are included in all packs by default.

Requirements

  • Node.js 16+ (or pre-built binary)
  • Modrinth app installed
  • Internet connection for API queries

License

ISC

About

A tool that uses the modrinth api to automatically generate modpacks for the client, server, and more

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages