Skip to main content

The CLI

The balaur binary is the editor, the runtime and the CLI.

balaur new my-game
balaur run my-game # dev mode, hot reload on
balaur edit my-game # open in the editor
balaur export my-game # compile scripts into my-game.bpak
balaur play my-game.bpak # run from bytecode only

Commands

CommandEffect
new <path>Scaffold a project: project.toml, a main scene, one script
run <path>Run in dev mode with hot reload
edit <path>Open the project in the editor
export <path>Compile scripts to bytecode and bundle a .bpak; --target <platform> produces a fused executable
play <pack>Run a pack, with no compiler and no watcher
import <file> --project <path>Bring a file in: a .glb model, an .aseprite sprite, a .tmx or .ldtk level, or a project.godot
replay <session>Play back a session recorded with run --record; --verify re-checks every tick
apiDump every script module, function and constant as JSON

Run modes

ModeGPUWindowWhat it is for
headless (--headless)nonotests, CI, servers, determinism runs
offscreen (--offscreen)yesnoscreenshots, automation, visual CI
windowedyesyesplaying and editing
  • All three modes compute the same simulation.
  • --frames N stops after N frames.
  • render::screenshot("out.png") captures the next rendered frame, offscreen or windowed.

From source

cargo run -p balaur_cli -- run my-game --headless
cargo run -p balaur_cli --features window -- edit my-game

--features window builds the kiss3d/wgpu window. Without it everything runs headless.