Skip to Content
GameGenReferenceue.mjs commands

ue.mjs command reference

Scripts/ue.mjs builds, tests, opens and replays the Floppy Bird tutorial on the machine where Unreal Engine is installed. The Unreal view’s buttons run it, and so do the agents. It has no dependencies and runs on Node 18 or newer, Bun or Deno.

Run it from the project folder:

node Scripts/ue.mjs <command> [options]

The script works on the host it runs on. It picks the FloppyBirdEditor target for Windows, macOS or Linux, and it does not sync files or use SSH.

Commands

CommandWhat it doesButton in the Unreal view
buildCompiles the editor target.Build
rebuildCleans, then compiles the project again.None
testBuilds, then runs the automation tests without a window.Run tests
editorOpens the project in Unreal Editor and waits until you close it.None
editor-startStarts Unreal Editor with Remote Control on, waits until it answers, then returns.Open editor
editor-stopStops the editor that editor-start launched.Stop editor
replay RUNRe-simulates a recorded run from tick 0 and writes a new run.None

Close the project’s editor before build, rebuild or test. The script does not stop editors it did not start.

Options for build, rebuild and test

OptionMeaningDefault
--engine-root DIRThe Unreal install that contains Engine/.UE_ROOT, then the engine the Epic Games launcher installed
--filter PREFIXThe automation test prefix. Must be FloppyBird or start with FloppyBird.FloppyBird
--timeout SECONDSThe total time allowed for the build and tests. At most 86400.1800
--clean-buildClean before building, to prove that this project’s code compiled.Off
-h, --helpPrint the usage text.

Options accept --name value and --name=value.

Options for replay

OptionMeaningDefault
--to NKeep the recorded inputs up to tick N, and none after it.
--flap-at NFlap on tick N whatever was recorded. Repeatable.
--no-flap-at NDo not flap on tick N. Repeatable.
--max-ticks NStop at tick N if the bird is still alive.
--child RUNThe name of the run to write.The run’s name, -replay- and a counter
--runs-root DIRWhere runs live.Saved/Lou/runs
--stop-file FILEEnd the replay when this file appears.

See Replay from the terminal for examples.

Examples

node Scripts/ue.mjs build node Scripts/ue.mjs build --engine-root /path/to/UE_5.9 node Scripts/ue.mjs test --filter FloppyBird.Restart node Scripts/ue.mjs test --clean-build --timeout 1800 node Scripts/ue.mjs rebuild node Scripts/ue.mjs editor-start node Scripts/ue.mjs editor-stop node Scripts/ue.mjs replay play-20261111-200501-1 --flap-at 41

On Windows, quote an engine path that contains spaces:

node Scripts/ue.mjs build --engine-root "C:\Program Files\Epic Games\UE_5.9"

Exit codes

CodeMeaning
0Success. For test, every selected test reported its own success.
1The build failed, a test failed, or a replay did not complete.
2No test was selected, a selected test did not report, the arguments were wrong, or the named run was not found.
3editor-start could not start because port 30010 is in use.
124The timeout was reached.

Files it writes

All under Saved/Automation/ in the project.

FileWritten by
floppy-result.jsonbuild, rebuild, test
floppy-build.logbuild, rebuild, test
floppy-tests.logtest
floppy-replay.logreplay
qa-editor.logeditor-start

How the engine is chosen

In order: --engine-root, the UE_ROOT variable, the Epic Games launcher’s install list, then the default install folder. When it finds the engine by itself, the script prints “Using the Unreal Engine at” and the folder. See Engine setup.

Messages

MessageMeaning
“TESTS PASSED”Every selected test reported success.
“TESTS FAILED”At least one test failed.
“TEST COMPLETIONS MISSING”A selected test did not report a result. The missing names follow “Missing:”.
“NO TESTS SELECTED in Source/”The filter matched no test.
“EDITOR READY”editor-start succeeded.
“EDITOR NOT STARTED: port 30010 is in use by another Unreal Editor”Close the other editor, or the crash dialog of one that crashed.
“EDITOR NOT READY after … s”The editor did not answer in time. Run editor-stop.
“No editor was started by editor-start.”editor-stop had nothing to stop.
“no Unreal Engine install was found: set UE_ROOT or pass —engine-root”See Engine setup.

Next steps

Last updated on