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

Helix CompilerA TypeScript library to create datapacks

Write your datapack in TypeScript and let the compiler generate the .mcfunction and JSON files for you.

Helix Compiler

Write TypeScript, get a datapack ​

Here's a small function that greets every player and hands them some diamonds. The tabs below are the actual files the compiler produced from it:

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

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

dp.createFunction("greet").build((ctx) => {
  const players = Selector.allPlayers();
  ctx.tellraw(players, "Welcome to the server!");
  ctx.playerGive(players, Item.DIAMOND, 3);
});

Open in playground

Compiled output - the real files helix emits for the code above:

txt
tellraw @a {"text":"Welcome to the server!"}
give @a minecraft:diamond 3
txt
{
  "pack": {
    "description": "welcome\nCreated using Helix",
    "min_format": [
      107,
      1
    ],
    "max_format": [
      107,
      1
    ]
  }
}

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