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
| Command | What it does | Button in the Unreal view |
|---|---|---|
build | Compiles the editor target. | Build |
rebuild | Cleans, then compiles the project again. | None |
test | Builds, then runs the automation tests without a window. | Run tests |
editor | Opens the project in Unreal Editor and waits until you close it. | None |
editor-start | Starts Unreal Editor with Remote Control on, waits until it answers, then returns. | Open editor |
editor-stop | Stops the editor that editor-start launched. | Stop editor |
replay RUN | Re-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
| Option | Meaning | Default |
|---|---|---|
--engine-root DIR | The Unreal install that contains Engine/. | UE_ROOT, then the engine the Epic Games launcher installed |
--filter PREFIX | The automation test prefix. Must be FloppyBird or start with FloppyBird. | FloppyBird |
--timeout SECONDS | The total time allowed for the build and tests. At most 86400. | 1800 |
--clean-build | Clean before building, to prove that this project’s code compiled. | Off |
-h, --help | Print the usage text. |
Options accept --name value and --name=value.
Options for replay
| Option | Meaning | Default |
|---|---|---|
--to N | Keep the recorded inputs up to tick N, and none after it. | |
--flap-at N | Flap on tick N whatever was recorded. Repeatable. | |
--no-flap-at N | Do not flap on tick N. Repeatable. | |
--max-ticks N | Stop at tick N if the bird is still alive. | |
--child RUN | The name of the run to write. | The run’s name, -replay- and a counter |
--runs-root DIR | Where runs live. | Saved/Lou/runs |
--stop-file FILE | End 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 41On 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
| Code | Meaning |
|---|---|
0 | Success. For test, every selected test reported its own success. |
1 | The build failed, a test failed, or a replay did not complete. |
2 | No test was selected, a selected test did not report, the arguments were wrong, or the named run was not found. |
3 | editor-start could not start because port 30010 is in use. |
124 | The timeout was reached. |
Files it writes
All under Saved/Automation/ in the project.
| File | Written by |
|---|---|
floppy-result.json | build, rebuild, test |
floppy-build.log | build, rebuild, test |
floppy-tests.log | test |
floppy-replay.log | replay |
qa-editor.log | editor-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
| Message | Meaning |
|---|---|
| “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. |