Skip to content

Search

Documentation

The CLI

Every balaur command (new, run, edit, export, play, import, replay, api) and the three run modes: headless, offscreen and windowed.

On this page

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       # check scripts, bundle my-game.bpak
balaur play my-game.bpak    # run the pack

Commands

Command Effect
(none) Open the project manager: recent projects, a new one from a template, a folder
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> Check every script and bundle a .bpak; --target <platform> produces a fused executable
play <pack> Run a pack, with no watcher
import <file> --project <path> Bring a file in: a .glb model, an .aseprite sprite, or a .tmx or .ldtk level
replay <session> Play back a session recorded with run --record; --verify re-checks every tick
check <path> Compile every script a scene attaches without running it, and print each finding with its file and line
test <path> Attach every tests/**/*.bs to a fresh node in a headless copy and tick it for 120 frames; a logged error or a trap fails the run
fmt <path> Format every script in a project, its line breaks and comments kept
lsp Serve the same checks over the Language Server Protocol, for an editor outside Balaur
shrink <path> Write smaller copies of a project's images for one target, which an export folds onto the names the scenes already use
update Update this install to the newest build on its channel: the binary, the bundled editor and its runtime template
api Dump every script module, function and constant as JSON

Run modes

Mode GPU Window What it is for
headless (--headless) no no tests, CI, servers, determinism runs
offscreen (--offscreen) yes no screenshots, automation, visual CI
windowed yes yes playing 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. Toolchain and packages: Build from source.