Skip to content
Get started

Quick start

View as Markdown

Create a project, start the dev server, and play your game. Then change it and save: the server swaps it while you stay connected.

You need Bun 1.4.4 or newer and Minecraft: Java Edition 26.3. The CLI downloads the Java it runs servers on, a GraalVM JDK that JIT-compiles game code, and keeps it with the dev servers and its other downloads in ~/.minekube (MINEKUBE_HOME moves it).

Install the Minekube CLI once. It is minekube, mk for short, and this puts both on your PATH. Then create a project:

Terminal window
bun add -g https://github.com/minekube/minekube/releases/latest/download/minekube-cli.tgz
mk init my-game
cd my-game

my-game holds a small game (each block you place scores a point), its tests, an AGENTS.md and the minekube-games skill for your coding agent. Its vite.config.ts names the game’s bundle after the folder: my-game is the game’s id on the server. Game structure explains every file.

Start the server in its own terminal and keep it running:

Terminal window
mk server --accept-eula

It runs Paper on localhost:25569 with the Minekube plugin: a flat creative world in offline mode, and the Effect UI devtools on 127.0.0.1:4774. --accept-eula accepts the Minecraft EULA for the new server, so pass it only if you agree. Use one dev server for all your games.

In a second terminal, in my-game:

Terminal window
mk dev .

mk init already generated the Paper types of the version vite.config.ts names into types/paper, and mk dev brings them up to date first. Then it builds the bundle vite.config.ts names, src/game.ts, with Vite, installs it on the dev server and reinstalls it on every save. The server log says Installed my-game with the revision, the first 8 hex digits of the bundle’s SHA-256.

In Minecraft, choose Multiplayer, then Direct Connection, and join localhost:25569. Place a block: the action bar shows Score: 1, then Score: 2.

To see the runtime’s messages in chat, prefixed [games], make yourself an operator: type op <your name> in the mk server terminal.

Open src/game.ts, change NamedTextColor.GOLD to NamedTextColor.AQUA and save. Within a tick or two the chat says Reloaded my-game with the new revision, and your next score shows in aqua. You never left the server.

You (alex) and sam play on your dev server; the Minecraft window is yours. sam asks for an aqua score; you change NamedTextColor.GOLD to AQUA in src/game.ts and save. mk dev installs the new bundle, the chat says "[games] Reloaded my-game (5d2e7b18)", nobody is disconnected, and your next score shows in aqua, starting over at 1 because a new revision starts from init.

A new revision starts with a fresh Model from init, so the scores start over. The world keeps its blocks. A bundle that fails to load never replaces the running one: you see bundle rejected, keeping the previous revision and the error.

Open http://127.0.0.1:4774. It shows the running session live: every message, the Commands it issued, why it happened and how the Model changed. Your coding agent reads the same through MCP, configured in the project’s .mcp.json. See Devtools and message logs.

Every revision records its messages on the server, in plugins/Minekube/recordings/my-game/. Copy one into your project’s recordings/ folder, then run:

Terminal window
bun test
bun run check

bun test runs the rules’ Stories and replays every recording through your current rules. bun run check type-checks and lints with Effect’s strict rules. Testing covers both.

Was this helpful?