Alpha: this compiler is under active development and updates will break your projects. Not recommended for real use yet.
Skip to content

Getting started ​

Write a datapack in TypeScript and compile it for any supported Minecraft version.

Write a pack ​

ts
import { Datapack, Selector, v26_2 } from "helix";

const dp = new Datapack("mypack", v26_2);

dp.createFunction("load").build((ctx) => {
  ctx.say("Hello, world!");
  ctx.tellraw(Selector.allPlayers(), "Welcome!");
});

dp.writeDatapack("./out");

Or try it in the playground.

Pick a package ​

PackageUse it for
helixthe compiler: typed values and commands
spoolopt-in plugins (motion, cutscenes, entity sets...)
twinestructuring a whole pack as modules

Each builds only on the one above it. See Architecture for why.

Build from source ​

Packages link each other's built dist/, so build in this order:

sh
npm --prefix helix install && npm --prefix helix run build
npm --prefix spool install && npm --prefix spool run build
npm --prefix twine install && npm --prefix twine run build

WARNING

After changing a package, rebuild it before anything that uses it, or you'll see stale types.

Released under the MIT License · Credits
These docs were written with AI; the layout and every page have been reviewed by a human.