Skip to main content
Change of provenance

The repository or configuration that created this release differ from a previous release. View details.

Modsmith

A Python toolkit for Minecraft modpacks, mod loaders and game instances.

CI PyPI Python 3.12+ Pyright strict Ruff Alpha MIT license

Website · Documentation · English · 简体中文


Modsmith is a library, not a launcher. Its small modules work together or alone, so you can build your own modpack installer, updater, CLI or GUI. To install modpacks yourself, use the Modsmith command line, which is built on it.

Two platforms, one API

Search and download from Modrinth and CurseForge the same way.

Modpacks, even offline

Open Modrinth and CurseForge packs without a network connection.

Four mod loaders

Install Forge, NeoForge, Fabric and Quilt with one call.

Safe updates

Update a modpack and keep the changes players made.

The right Java

Find the Java that a game version needs, or download it.

Reliable downloads

Files are verified, and interrupted downloads pick up where they stopped.

Installation

Modsmith needs Python 3.12 or newer. Install it from PyPI:

pip install modsmith

Or with uv:

uv add modsmith

Quick start

Download a modpack from Modrinth, install its loader, create an instance and add it to the official launcher:

import modsmith as ms

with ms.platforms.Modrinth("my-tool/1.0") as modrinth:
    project = modrinth.get_project("fabulously-optimized")
    release = next(modrinth.iter_releases(project, game_version="1.21.1"))
    pack = ms.packs.load(modrinth.fetch(release, ".cache"))

game = ms.minecraft.GameDir.default()
version_id = pack.install_game(game)

instance = ms.instances.Instance("instances/fabulously-optimized")
instance.sync(pack)

ms.launcher.Launcher(game).add_profile(pack.name, version_id, instance.path)

Open the official launcher once before you run this, and keep it closed while it runs. To update, run instance.sync(pack) again with a newer pack.

Recipes

Every module also works alone.

Search for projects
with ms.platforms.Modrinth("my-tool/1.0") as modrinth:
    results = modrinth.search("sodium", project_type="mod", loader="fabric", limit=5)

for project in results.projects:
    print(project.name, project.url, project.downloads)
Install a CurseForge modpack

CurseForge needs an API key. Some mods can only be downloaded by hand. They stay in pack.unresolved, and sync can pick them up from a folder.

import os
from pathlib import Path

with ms.platforms.CurseForge(os.environ["CURSEFORGE_API_KEY"]) as curseforge:
    pack = curseforge.resolve(ms.packs.load("pack.zip"))

for entry in pack.unresolved:
    print(entry.manual_url)

instance.sync(pack, adopt_from=[Path.home() / "Downloads"])
Preview an update
changes = instance.diff(pack)  # changes nothing

print("New:", changes.added)
print("Updated:", changes.updated)
print("Removed:", changes.removed)
print("Changed by the player:", changes.conflicts)
Install only a mod loader
game = ms.minecraft.GameDir.default()

ms.loaders.Fabric("0.16.10", "1.21.1").install(game)
ms.loaders.NeoForge("21.1.233", "1.21.1").install(game)
Find a Java runtime
ms.minecraft.install_version(game, "1.21.1")

component = ms.java.required_for(game.version("1.21.1"), game)
runtime = ms.java.find(component, game=game) or ms.java.download(component)
print(runtime.executable)
Show progress and cancel

Long-running calls accept progress= and cancel=, so they are easy to connect to a GUI.

token = ms.CancelToken()  # call token.cancel() from any thread


def show(event: ms.Progress) -> None:
    print(f"{event.task}: {event.current}/{event.total} {event.unit}")


instance.sync(pack, progress=show, cancel=token)
Handle errors

Every error derives from ModsmithError.

from modsmith.errors import ModsmithError

try:
    instance.sync(pack)
except ModsmithError as error:
    print(f"Sync failed: {error}")

How it fits together

Platforms, pack formats and mod loaders are independent, and you can add your own.

Module Provides
modsmith.platforms Modrinth, CurseForge and the Platform base class
modsmith.packs load(), Modpack, and the mrpack and CurseForge formats
modsmith.loaders Forge, NeoForge, Fabric, Quilt and the Loader base class
modsmith.instances Instance, with sync() for packs and plan(), add() and remove() for single mods and packs
modsmith.metadata read() for what mods and packs declare about themselves
modsmith.minecraft GameDir, Version and vanilla version downloads
modsmith.java Runtime lookup and Mojang runtime downloads
modsmith.launcher Official launcher profiles
modsmith.net Session, Resource and download()
modsmith.errors ModsmithError and its subclasses

Compatibility

Supported
Python 3.12 and later
Operating systems Windows, macOS and Linux
Platforms Modrinth and CurseForge
Modpack formats .mrpack and CurseForge .zip
Launcher Official Minecraft Launcher, including the Microsoft Store version
Loader Minecraft versions
Forge 1.13.2 and later
NeoForge 1.20.1 and later
Fabric 1.14 and later
Quilt 1.14.4 and later

Scope and status

Modsmith works alongside the official launcher. It does not sign in to accounts or start the game.

The project is in alpha, so the API may change. No automated test starts the game yet. The command line is out, and a desktop app is planned.

Part of Modsmith

What it is Code
Command line Modpacks from your terminal ModsmithMC/modsmith-cli
Python library Build your own modpack tools ModsmithMC/modsmith-python
Website The project's home ModsmithMC/modsmithmc.github.io

Contributing

Contributions are welcome. See CONTRIBUTING.md to get started.

License

Modsmith is released under the MIT License. It is not affiliated with Mojang, Microsoft, Modrinth or CurseForge.

Metadata

Release files for modsmith 0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Change of provenance

The repository or configuration that created these release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Source distribution (sdist)

Source distribution for modsmith 0.3.6
File Size Uploaded Provenance Actions
modsmith-0.3.6.tar.gz 270.7 kB With provenance Details for modsmith-0.3.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for modsmith 0.3.6
File Interpreter ABI Platform Actions
modsmith-0.3.6-py3-none-any.whl Python 3 none any Details for modsmith-0.3.6-py3-none-any.whl

Total release size: 367.3 kB

Release files / modsmith-0.3.6.tar.gz

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL modsmith-0.3.6.tar.gz
Size 270.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0e88d913b5bf9142a0aff1d2f3a727b633c8cf5c7f349d692dcad13e28f6c2f0
BLAKE2b-256 checksum
How to use checksums
dd998a03cb8a8008898b6d9729b9190fde845f7ba0f56179be1e4dc79546c281
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / modsmith-0.3.6-py3-none-any.whl

Change of provenance

This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.

We recommend inspecting the repository and configuration before proceeding. View details.

Download URL modsmith-0.3.6-py3-none-any.whl
Size 96.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
172b2072c8ac85bb12d3e8bed018f9211756615b04f3742b6762fcbd8514577b
BLAKE2b-256 checksum
How to use checksums
16558bbc555064ae6456d3cd033b5b488121a4d552ac34d07cd2920942650353
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for modsmith 0.3.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Change of provenance

The repository and configuration that created this release differ from a previous release.

While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.

Select from 2 files

Attestation for modsmith-0.3.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page