Skip to content

CLI reference

geppetto [--version] {validate,run,replay,inspect,explore,propose,report,serve,simulators,license,device} ...

Exit codes: 0 every test passed, 1 a test failed, 2 a usage, validation or run error, 130 interrupted.

geppetto validate TESTS...

Checks test files without running them. A directory is searched recursively for *.json. Prints each file with its step count, or the first problem and exits 2. Warnings, such as an action with no state expectation after it, go to stderr and do not stop a test; geppetto run prints them too and the receipt keeps them.

geppetto run TESTS... [--target T | --app APP] [--app-log PATH] [--out DIR] [--record MODE]

Runs tests in order against a running PuppetXR simulator, or starts the app for them with --app. Every file is validated first, so nothing runs if one is invalid.

Option Meaning
--target Simulator process ID or app name. Required when more than one simulator runs.
--app-log The app's log file. Required by tests with log expectations.
--out Directory for receipts; default geppetto-runs.
--record failures (default) keeps a PuppetXR recording of each failed or errored test as session.puppetxr; all keeps every test's; none never records.
--app Start this app on PuppetXR, run the tests, then stop it: an executable, or a macOS .app bundle. Not with --target.
--runtime With --app: PuppetXR's puppetxr.json; default $XR_RUNTIME_JSON.
--app-arg With --app: one argument for the app; repeat it. Write --app-arg=-logFile for an argument that starts with a dash.
--app-env With --app: one KEY=VALUE environment variable for the app; repeat it. XR_RUNTIME_JSON is Geppetto's to set, and no PUPPETXR_* variable is passed: PUPPETXR_REPLAY and the like would feed the app input Geppetto never sent.
--fresh-app With --app: start a new app for each test file and stop it after, so no test inherits another's state (its output goes to app-output-<n>.log).
--show With --app: keep PuppetXR's mirror window.
--fixed-step With --app: start the app on PuppetXR's fixed step (PUPPETXR_FIXED_STEP=1), whose clock advances one display period per frame instead of following the wall clock. Frame-paced steps finish sooner when the app draws above PuppetXR's refresh rate (90 Hz by default) and later when it draws below it. The receipt's launch records fixed_step; without it, an app Geppetto starts does not inherit PUPPETXR_FIXED_STEP, though a PuppetXR config file's clock.mode can still choose the fixed step.
--jobs With --app: start this many apps (1 to 999, default 1) and share the test files out among them; see Several apps at once.
--ready-timeout With --app: seconds to wait for the app to serve PuppetXR and register the Geppetto tools its tests use; default 120.

With --app, Geppetto sets XR_RUNTIME_JSON, PUPPETXR_CONTROL=1, unless --show PUPPETXR_HEADLESS=1, and with --fixed-step PUPPETXR_FIXED_STEP=1. A macOS app bundle starts through open -g -j -n, hidden and without taking focus, so tests run in the background while you use the machine; any other executable starts as a child process. Its output goes to app-output.log in the run's folder. Geppetto waits until the app's simulator announces itself and the Geppetto tools its tests need are registered, runs the tests, then asks PuppetXR to end the session and terminates the app if it is still running ten seconds later. An app that exits or never serves PuppetXR before --ready-timeout is a run error (exit 2); a bundle that exits is reported as soon as its process is gone, and one that times out is stopped, not left running hidden. On macOS, Geppetto first samples a timed-out app's stacks for 3 s into app-output.<pid>.sample.txt beside its output and names that file in the error; the sample lists stacks and loaded library paths, so review it before sharing it. For a Unity player, pass --app-arg=-logFile --app-arg=<path> and the same path to --app-log.

Several apps at once

--jobs N starts N copies of the app and gives each the next test file as it finishes one; with --fresh-app, each test file gets a new app of its own. Tests spend most of their time waiting on PuppetXR's frames, so on the PuppetXR Demo sample eight test files took about 11–13 s with one app, 7 s with two and 6 s with four. Each copy uses the CPU, GPU and memory of a full app; a heavy app gains less.

In --app-arg and --app-log, {instance} becomes each app's number, 1 to N, so each writes and is read from its own log: --app-arg=-logFile --app-arg=logs/player-{instance}.log --app-log logs/player-{instance}.log. With --jobs above 1, an --app-log without {instance} is refused, since one app's log lines could otherwise satisfy another app's test. Anything else an app writes to a fixed path is shared among the copies; give it {instance} too.

Output lines start with the app's number ([2] ✓ …), each app's output goes to app-output-<n>.log, receipts record launch.instance and launch.jobs, and junit.xml and summary.md list the tests in file order. An app that does not start leaves its tests to the others and makes the run an error (exit 2), and one whose connection is lost stops taking tests while the others go on. Copies of one macOS bundle start one at a time until each one's process is seen, about a quarter of a second each; their waits for PuppetXR and the Geppetto tools overlap.

It stops early if the simulator connection is lost. On a PuppetXR version Geppetto was not built against it prints a warning on stderr and still runs; the receipts record driver.known_version: false. With --app, each receipt's launch names the build it started, with a SHA-256 of the whole bundle (or of the file given) and the --app-env keys, never their values. On macOS, --target at a Unity Editor that is not the app in front also warns, since a background Editor stalls during Play mode switches and loading; a -batchmode Editor, which has no window, is not warned about. See Evidence and reviews for what it writes.

geppetto replay RECORDING [--target T] [--timeout S] [--frames DIR [--every N] [--steps FIRST[..LAST]]]

Replays a test's PuppetXR recording into a running simulator: the same poses, inputs and gestures, frame by frame. RECORDING is a session.puppetxr or the test folder that holds one. It waits until the replay ends, up to --timeout seconds (default 600), and prints the frames replayed and how many diverged from the recording.

Exit codes: 0 the replay ended with no divergence, 1 some frames diverged, 2 no recording, an error, a step or screenshot PuppetXR refused while rendering --frames (reported at once, and the app resumed), or the app ended before the result could be read.

PuppetXR ends the app's session when a replay ends unless the app was started with PUPPETXR_REPLAY_EXIT=0; start it that way so geppetto replay can read the result. A recording holds the simulator's side only: start the same build in the same state the test started from (a test's reset fixture gives you that) to see the app fail the same way.

--frames DIR also saves what the app showed during the replay, for a video of a failure: Geppetto pauses the app before the replay's first frame, then steps it N frames at a time (--every, default 1) and takes a screenshot at each stop, as frame_<frame>.png in DIR, which must be new or empty. It prints an ffmpeg command that makes them a video and resumes the app afterwards. Any PuppetXR with its control server does this; nothing extra is needed. It runs at a few frames per second, but only the replay is rendered: the test run that made the recording only recorded, which costs it nothing measurable, so a video never changes the run it shows.

--steps FIRST[..LAST] saves only the frames those steps ran in, for a video of one moment: --steps turn-away, or --steps aim..opened for a stretch. Geppetto reads each step's recording_frames from the receipt.json next to the recording, steps through the frames before the window without saving them, saves the window from the frame before its first step, and lets the rest of the replay run on unpaused. It refuses a receipt whose recording.sha256 is not the recording's, and steps that end past the recording's last frame. To film a test that passes, keep its recording with geppetto run --record all.

geppetto inspect [--target T] [--json] [--provider ID [--path PATH]]

Lists what a test can use in the running app: the PuppetXR version, the Geppetto app tools it registered, its targets (for point with target), its state providers with their current values (for expect: state) and its fixture actions (for action). Generated target IDs, inactive targets and actions that change project files (which geppetto run refuses) are marked. The text hides the geppetto-runtime provider's value and lists each provider's top-level keys; --json prints everything. --provider prints one provider's state readably, and --path (dot-separated keys or indices) only the value a state expectation with that path would read. It reads only: no input is sent and no action is run.

geppetto explore --app APP [--runtime R] [--app-log PATH] [--interaction I] [--fixture ACTION] [--depth N] [--max-probes N] [--max-seconds S]

Probes each active target with a stable ID in a new app (aim, then click or pinch) and writes geppetto-runs/<time>/exploration.json: what each probe changed in the app's state and log, and findings that need no spec, such as an exception in the log or an app that stopped. Takes --app-arg, --app-env, --show and --ready-timeout as geppetto run --app does. Exits 0 with no findings, 1 with findings, 2 on an error. See Explore and propose tests.

geppetto propose {check,accept,reject,list} ...

Works on proposed tests in --proposals (default geppetto-proposed). check NAME --app APP runs the gates (valid, red before green, three passing repeats, a control run without the input, a wrong-target run), each in a new app, and exits 0 when all pass, 1 when one fails, 2 on an error. accept NAME [--suite DIR] refuses without a person at a terminal. It asks that person to type the name, then copies the test into the suite (default geppetto-tests). reject NAME --reason TEXT records why the claim is wrong. list shows each proposal's gates and decision. See Explore and propose tests.

geppetto report [--runs DIR] [--out DIR]

Builds the static dashboard from every receipt under --runs (default geppetto-runs) into --out (default geppetto-report) and prints the path of its index.html.

geppetto serve [--runs DIR] [--port PORT]

Serves the same dashboard at http://127.0.0.1:PORT/ (default port 8765; 0 picks a free one) and rebuilds it when a receipt under --runs changes, so a reload shows the tests that have finished since. It is read-only: it never connects to a simulator. It listens on the loopback address only and refuses a request addressed to any other host name, so other sites cannot read receipts or screenshots through the browser. Ctrl-C stops it. A port already in use exits 2.

geppetto license activate KEY | indie | status | remove

geppetto run, geppetto replay, geppetto explore and geppetto propose check need one of these, checked in this order:

  1. A licence key, for companies: from https://ambient-intent.com/geppetto. activate KEY checks it and saves it for this user, readable by them only (~/.config/geppetto/license, $XDG_CONFIG_HOME/geppetto/license, or %APPDATA%\geppetto\license on Windows); - reads it from standard input. In CI, set it as the secret GEPPETTO_LICENSE instead; it is used before the file. One key covers the whole organisation: people, agents and machines are not counted. A yearly key keeps working for 14 days after it expires, with a warning; a one-time key keeps working forever on every Geppetto released up to its updates date.
  2. An indie declaration, free for individuals and organisations whose revenue plus funding is under $100k a year: indie --yes records it for a year (indie alone shows the terms). In CI, set GEPPETTO_INDIE=1.
  3. The free trial: 30 days from the first geppetto run or geppetto replay on this machine. CI machines (where CI or a similar variable is set) get no trial.

Without one they exit 2 before they start an app, connect to a simulator or send input; they never run with results hidden. validate, inspect, simulators, report, serve and propose list, accept and reject are always free. Nothing here changes a test's steps, receipt, outcome or exit code.

status shows what is in use (licensee, tier and expiry or updates date for a key, never the key itself; the declaration's date; or the trial's day) and exits 1 when nothing is. It never starts the trial. remove deletes the saved key and the indie declaration.

Everything is checked offline: Geppetto sends nothing anywhere and does not identify the machine.

geppetto simulators

Lists running PuppetXR simulators with their control server on: process ID, address, PuppetXR version (marked unknown to Geppetto when Geppetto was not built against it) and app. Simulators announce themselves with discovery files in $XDG_RUNTIME_DIR/puppetxr and /tmp/puppetxr (the temporary directory on Windows). Stale files from exited simulators are skipped; on Windows they show up as a connection error instead.

geppetto device {list,check,prepare,restore,watch} ...

Keeps a development Quest fit for unattended runs and measures an app on it. See Run on a Quest. Every command except list needs --serial: Geppetto never picks a device for you. --adb or $GEPPETTO_ADB chooses the adb; the default is the one on PATH. Commands that change scriptable-testing properties read the Store PIN from $GEPPETTO_QUEST_PIN.

Command Does
list Devices adb sees: serial, state, model, codename.
check --serial S [--model M] [--package P] [--json] Reads the device's state without changing it. Exits 1 when it lists problems.
prepare --serial S Turns off auto-sleep, the boundary and blocking dialogs and reports the headset worn. Records what it changed in <out>/devices/<serial hash>.json, or --changes.
restore --serial S Undoes exactly what prepare recorded.
watch --serial S --package P [--apk F] [--activity A] Launches the app, keeps the device fit through --warmup and a measured window of --seconds, then writes device-receipt.json with the frame rate. Exits 0 on a pass, 1 on a failure, 2 otherwise.
watch option Meaning
--model The model the device must report, such as "Quest 3" or "Quest 3S". Also for check and prepare.
--min-battery Below this percentage, and not charging, nothing starts; default 30.
--max-thermal The hottest thermal status (none, light, moderate, ...) a run may start or be measured at; default light.
--cool-timeout Seconds to wait for a hot device to cool before launch; default 600.
--interval Seconds between state reads; default 2.
--min-fps Fail the run when the window's fifth-percentile frame rate is below this; default none.
--allow-reboot Reboot a device that will not wake, before launch only.
--out Directory for receipts and prepare's record; default geppetto-runs.