JSPM

@loontail/minecraft-kit

0.5.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 564
  • Score
    100M100P100Q59867F
  • License MIT

Stateless TypeScript Minecraft launcher library and interactive CLI for vanilla, Fabric, and modern Forge.

Package Exports

  • @loontail/minecraft-kit
  • @loontail/minecraft-kit/cli
  • @loontail/minecraft-kit/package.json

Readme

@loontail/minecraft-kit

A stateless TypeScript Minecraft launcher library and interactive CLI for vanilla, Fabric, and modern Forge.

Documentation: https://loontail.github.io/minecraft-kit/

Features

  • Resolve and install vanilla Minecraft, Fabric, and modern Forge.
  • Install Mojang Java runtimes (java-runtime-gamma, delta, jre-legacy, ...).
  • Verify, repair, and launch installations.
  • Fully typed onEvent progress callbacks.
  • Interactive mckit CLI.
  • Stateless — writes only the files Minecraft itself needs; nothing else lives on disk.

Install

npm install @loontail/minecraft-kit

Usage

import { MinecraftKit, AuthModes, Loaders } from "@loontail/minecraft-kit";

const kit = new MinecraftKit();

const target = await kit.targets.resolve({
  id: "fabric-client",
  directory: "./minecrafts/fabric-client",
  minecraft: { version: "1.20.1" },
  loader: { type: Loaders.FABRIC },
});

const plan = await kit.install.plan(target);
await kit.install.run(plan);

const composition = await kit.launch.compose(target, {
  auth: { mode: AuthModes.OFFLINE, username: "Player" },
});
const session = kit.launch.run(composition);
await session.exited;

CLI

mckit

The CLI is fully interactive — no required arguments. Run inside the directory that should host your installations.

License

MIT