CLI

turian-cli runs Turian's build and runtime pipeline without a window: the same compiler, importer, exporter and renderer as Studio. Use it in scripts, in CI, and to check a project without opening the editor.

turian-cli --help            # every command
turian-cli <command> --help  # a command's options
turian-cli --version

Commands that take a project accept the project folder; it defaults to the current directory.

Creating and building

Command What it does
new <path> Creates a project in a new or empty folder: a starter scene, settings and Globals.cs.
compile [project] Reimports assets and compiles the scripts into .Cache/bin/CLI/. Fails on compiler errors.
export [project] [-c Debug\|Release] Builds a self-contained game into <project>/Output/ (Release by default).
play [project] Builds a debug version of the game and launches it in a window.
turian-cli new MyGame
turian-cli compile MyGame
turian-cli export MyGame
./MyGame/Output/MyGame        # MyGame.exe on Windows

Running and inspecting scenes headlessly

These commands accept --scene <asset id or path> (default: the startup scene), --reimport to import assets first, and --load-usercode to compile and load your scripts so your components run instead of loading as placeholders.

Command What it does
scene Loads a scene and reports its nodes, components and how many meshes resolved.
screenshot Renders a scene to a PNG: --out, --width, --height, --camera <node name> or --position x,y,z --yaw --pitch, --headlight, --gizmos, --locale.
playmode Runs a play session for --frames frames, as Studio's Play button does; --out saves the last frame, --locale forces a language.
pick Reports what a click at --x, --y through --camera would select — for diagnosing selection.
turian-cli screenshot MyGame --camera "Main Camera" --width 1920 --height 1080 --out shot.png
turian-cli playmode MyGame --load-usercode --frames 300 --out after-5s.png

Headless rendering needs a Vulkan driver; on machines without a GPU, Mesa's software driver (lavapipe) works.

UI documents

ui renders a .ui document to a PNG without a GPU or a scene, binding JSON as its data (inline, or @file.json):

turian-cli ui --file Assets/UI/menu.ui --out menu.png --data '{"Title":"Main Menu"}'

Asset packages (OAP)

An exported game carries its assets in an Open Asset Package. oap manages those files:

Command What it does
oap pack [project] <output> Packs a project's imported assets. --name, --store (no compression), --key <passphrase> (ChaCha20 encryption), --target <build target>, --requires <package>.
oap list <package> One line per asset: id, type, codecs, sizes and virtual path.
oap inspect <package> Header summary and manifest.
oap validate <package> Verifies the header and every asset's CRC-32; exits 1 on failure.
oap unpack <package> <dir> Extracts every asset.

Use in CI

Build your game on every push with the container image, which includes the .NET SDK and a software Vulkan driver:

# .github/workflows/build.yml
jobs:
  build:
    runs-on: ubuntu-latest
    container: ghcr.io/mass4org/turian-cli:latest
    steps:
      - uses: actions/checkout@v4
      - run: turian-cli export .
      - uses: actions/upload-artifact@v4
        with:
          name: game-linux
          path: Output/

Exit codes are non-zero on failure, so a broken script or a missing startup scene fails the job.


← All docs Edit this page