Skip to main content

Define a Minecraft modpack in a JSON file, specifying mods, shaders, and resource packs, then download everything into organized folders for easy copying into your .minecraft folder.

Project description

Rinth DL

Rinth DL is a command-line tool for searching, downloading, and managing Minecraft mods, modpacks, resource packs, shaders, datapacks, and plugins from Modrinth. It simplifies the process of automating mod downloads and their dependencies and allows you to manage modpacks using a JSON configuration file.

Table of Contents

Features

  • Search for Minecraft projects (mods, resource packs, etc.) on Modrinth.
  • Download your favourite mod, shader, etc. (even a specific version)
  • Automatically find dependencies when downloading whole modpacks.
  • Manage and download your modpacks via a simple JSON configuration file.
  • Supports various project types: mods, resource packs, shaders, plugins, etc.
  • Compatible with all platforms/loaders: Fabric, Forge, Minecraft, Iris, etc.

Installation

Install the package using pip or pipx

pipx install rinthdl

Usage

Searching for Projects

Use the rinth-search command to search for projects on Modrinth.

Example:

rinth-search sodium

This command will display a list of projects matching the search query, including titles, slugs, IDs, URLs, and descriptions.

Downloading a Project

Use the rinth-util command to perform various operations related to a project.

Available Operations:

  • get_id: Fetch the project ID using the project slug.
  • get_versions: Fetch all versions of a project.
  • get_version: Fetch a specific version of a project.
  • get_dependencies: Fetch dependencies of a project version.
  • get_project_meta: Fetch metadata of a project.
  • download: Download a project.

Command Syntax:

rinth-util <operation> <slug> [--game_version <game_version>] [--platform <platform>] [--project_version <project_version>] [--path <download_path>]

Parameters:

  • <operation>: The operation to perform (see above).
  • <slug>: The project slug (e.g., sodium).
  • --game_version: The Minecraft game version (e.g., 1.20).
  • --platform: The platform/loader (e.g., fabric, forge, minecraft, iris).
  • --project_version: The specific project version (e.g., 1.5.0). Leave empty to get the latest version.
  • --path: The path to download the file to (required when using the download operation).
  • --channel: The minimum release channel of the project. Default is beta. (one of: release, beta, alpha)

Examples:

  • Get the project ID of Sodium:

    rinth-util get_id sodium
    
  • Get all versions of Sodium for Minecraft 1.20 on Fabric:

    rinth-util get_versions sodium --game_version 1.20 --platform fabric
    
  • Download the latest version of Sodium for Minecraft 1.20 on Fabric (must be a release or beta):

    rinth-util download sodium --game_version 1.21 --platform fabric --path . --channel beta
    
  • Download a specific version of Sodium:

    rinth-util download sodium --game_version 1.20 --platform fabric --project_version mc1.20-0.4.10 --path /path/to/download
    

Managing Modpacks

Use the rinth-pack command to manage modpacks via a JSON configuration file.

Modpack Configuration File

Create a JSON file (e.g., modpack.json) with the following structure:

{
  "name": "Modpack 1",
  "game_version": "1.20",
  "path": "/path/to/download",
  "deps": "True",
  "channel": "beta",
  "projects": [
    {
      "name": "sodium",
      "version": "",
      "platform": "fabric",
      "type": "mod"
    },
    {
      "name": "fabric-api",
      "version": "",
      "platform": "fabric",
      "type": "mod"
    },
    {
      "name": "dramatic-skys",
      "version": "1.5.3.27vs",
      "platform": "minecraft",
      "type": "resourcepack"
    },
    {
      "name": "complementary-reimagined",
      "version": "",
      "platform": "iris",
      "type": "shader"
    }
  ]
}

Fields:

  • name: Name of the modpack.
  • game_version: Minecraft game version (e.g., 1.20).
  • path: The base path to download the mods to.
  • deps: Whether to download dependencies ("True" or "False").
  • channel: The minimum release channel to use. (release, beta, alpha)
  • projects: A list of project definitions.

Each project definition includes:

  • name: The slug of the project on Modrinth (e.g., sodium).
  • version: The specific version to download (leave empty string for the latest version).
  • platform: The platform/loader (e.g., fabric, forge, minecraft, iris).
  • type: The type of project (mod, resourcepack, shader, etc.).

Running the Modpack Script

rinth-pack <modpack_file>

Example:

rinth-pack modpack.json

This command will download all specified projects to the paths determined by the path and type fields in your configuration.

Examples

Example 1: Search for a Mod

rinth-search sodium

Example 2: Download a Mod with Dependencies

Create a modpack.json file:

{
  "name": "Awesome Modpack",
  "game_version": "1.20",
  "path": "~/modpacks/awesome",
  "deps": "True",
  "channel": "beta",
  "projects": [
    {
      "name": "sodium",
      "version": "",
      "platform": "fabric",
      "type": "mod"
    },
    {
      "name": "fabric-api",
      "version": "",
      "platform": "fabric",
      "type": "mod"
    },
    {
      "name": "dramatic-skys",
      "version": "1.5.3.27vs",
      "platform": "minecraft",
      "type": "resourcepack"
    },
    {
      "name": "complementary-reimagined",
      "version": "",
      "platform": "iris",
      "type": "shader"
    }
  ]
}

Run the modpack script:

rinth-pack modpack.json

Output:

Downloading assets for Awesome Modpack
Should I create path /home/your-name/modpacks/awesome? (y|N): y
✔️ Successfully downloaded sodium.
✔️ Successfully downloaded fabric-api.
✔️ Successfully downloaded dramatic-skys.
ℹ️ Dramatic-skys has a possible dependency for https://modrinth.com/project/fabricskyboxes
ℹ️ Template for your modpack.json: {"name": "fabricskyboxes", "version": "", "platform": "fabric", "type": "mod"}
✔️ Successfully downloaded complementary-reimagined.

Notes

  • The rinth-pack command automatically creates subdirectories under the specified path based on the type of each project (e.g., mods, resourcepacks, shaderpacks).
  • If deps is set to "True", dependencies will be searched for each project. If a dependency is not already listed in the projects list, it will inform you and provide a json template to add it.

Error Handling

  • The program has error handling to manage network issues, missing projects, invalid inputs, etc.
  • Error messages start with and provide details about the issue.
  • Common errors include:
    • Project not found.
    • No versions found matching the specified criteria.
    • Network connectivity problems.

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE Version 3 License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rinthdl-1.1.0.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rinthdl-1.1.0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file rinthdl-1.1.0.tar.gz.

File metadata

  • Download URL: rinthdl-1.1.0.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.10 Linux/5.15.154+

File hashes

Hashes for rinthdl-1.1.0.tar.gz
Algorithm Hash digest
SHA256 be8dbdeceb9ade5622e07e4f85fae4081543f6c4d66f064395e44459b26712b4
MD5 2721d6597cce5930962da72cdbf1c827
BLAKE2b-256 3537d7f805ecd67459f9360a9f7e2ffb1685aa4366ab858a5fe4019ade6933b4

See more details on using hashes here.

File details

Details for the file rinthdl-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: rinthdl-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.10 Linux/5.15.154+

File hashes

Hashes for rinthdl-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae7d00ffe00117084b69064ee9f275979fb82ab1a988b4883b127c61e659a922
MD5 fcbb1f316dec4c2fa3b830d61a77c080
BLAKE2b-256 db5fe30e3979301a1ea2e3f52ab294a854df2bd7c2d599a63871850e0a56b6b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page