RemoteControlServer

Inherits: Object

HTTP remote control server for the Blazium editor and optional game runtime.

Description

Exposes a localhost JSON HTTP API on /v1/* using the HTTPServer singleton so blazium-cli remote (and other clients) can query status, list commands, execute registered commands, read paginated engine logs (GET /v1/logs), inspect debugger/Autowork state via /v1/exec, and optionally evaluate expressions. POST /v1/exec and POST /v1/eval are held and completed on the main thread so scene/editor work does not block the HTTP poll thread. Built-in editor play commands include play_main_scene, play_current_scene, play_custom_scene, pause_playing, resume_playing, stop_playing, and play_status. Snapshot commands snapshot_editor and snapshot_scene return PNG as png_base64 (optional args.path also writes a file); use blazium-cli remote snapshot editor|scene -o file.png to save locally.

Enable with ProjectSettings blazium/remote_control/server_enabled or command-line --enable-remote-control. Port and auth: --remote-control-port=<port> (default 6507, or blazium/remote_control/server_port) and --remote-control-token=<token> (or blazium/remote_control/token). Default bind is 127.0.0.1:6507.

POST /v1/eval accepts { "expression": "...", "language": "gdscript" | "luau" }. Luau requires the luau_module and is sandboxed. Prefer blazium-cli remote as the client surface.

Properties

bool

allow_eval

false

String

remote_instance_id

""

String

token

""

Methods

Dictionary

eval_expression(expression: String, language: String = "gdscript") const

int

get_port() const

Dictionary

get_status() const

bool

is_started() const

Error

start()

void

stop()


Property Descriptions

bool allow_eval = false 🔗

  • void set_allow_eval(value: bool)

  • bool get_allow_eval()

When true, POST /v1/eval is permitted.


String remote_instance_id = "" 🔗

  • void set_remote_instance_id(value: String)

  • String get_remote_instance_id()

Short id for this editor process, assigned after startup by blazium-cli (POST /v1/instance). Exposed on /v1/health and /v1/status as instance_id.


String token = "" 🔗

Optional bearer token. When set, clients must send Authorization: Bearer <token> or X-Remote-Control-Token.


Method Descriptions

Dictionary eval_expression(expression: String, language: String = "gdscript") const 🔗

Evaluates expression as GDScript (Expression) or Luau (language gdscript/gd or luau/lua) when allow_eval is enabled.


int get_port() const 🔗

Active listening port.


Dictionary get_status() const 🔗

Status payload (project path, pid, mode, port, instance_id, luau_eval_available, etc.).


bool is_started() const 🔗

Returns whether remote control routes are active.


Error start() 🔗

Starts listening (if needed) and registers /v1/* routes.


void stop() 🔗

Unregisters routes and stops the HTTP listener if this server started it.