Skip to content
Download

brasa_cli

brasa_cli does from the command line what the editor does on Play.

brasa_cli build <project folder> [--sdk <sdk folder>]
brasa_cli run <project folder> [--sdk <sdk folder>] [--room <name>]
brasa_cli migrate <project folder>
brasa_cli export <project folder> <output folder> [--platform windows|linux] [--pack] [--no-zip]
brasa_cli mcp [--project <project folder>]
Command What it does
build Generates the build files and compiles the game.
run Compiles and opens the game. With --room, it starts at the given room instead of the start room.
migrate Converts a project from the old format to format 2.
export Exports the game, like the editor Export dialog. See Export the game.
mcp Opens the MCP server over stdio, for Claude Code, Cursor and Codex. See Brasa with AI.
  • --sdk <folder>: where the Brasa SDK is. Without it, brasa_cli looks for the SDK by itself, starting from the folder of its own executable.
  • --room <name>: only on run.
  • --project <folder>: only on mcp. The project folder; without it, each tool receives the project argument.

Just like Play, build and run also generate the project’s .vscode/, for autocomplete.

brasa_player (and C++ games) accept options to run without a window, useful in automated tests and continuous integration. They are what the run_game and screenshot tools of the MCP use.

brasa_player --project <folder> --hidden --no-save --frames 120 --shot frame.png
Option What it does
--frames N Runs N frames, one step per frame and without waiting for the clock, and exits. The exit code is not 0 if the game logged an error.
--shot <file.png> Writes the last frame as a PNG on exit.
--hidden The window does not show, stays at the game resolution (×1) and the sound goes to the silent driver. On a server with no screen, use SDL_VIDEODRIVER=dummy.
--no-save Neither reads nor writes the player’s save.

Errors come out as [brasa] ERRO: objects/Jogador.lua:12: message.