Start here
In this guide
- Create & developnew, doctor, dev, editor, run — with examples.
- Assets & packagesasset and package command groups in detail.
- Build, cook & testvalidate, cook, build, test, capabilities, lua-stubs.
Every demi command for authoring, validation, testing, and packaging.
CLI reference
The demi command line is the primary authoring, validation, testing, and packaging interface. It speaks the same diagnostics format as the editor.
Paths below assume demi. Add --help to any command for flags.
Create and develop
| Command | What it does |
demi new --list | List starter templates |
demi new <dir> --template <id> --name "My Game" | Generate a validated project (transactional; --dry-run supported) |
demi doctor | Inspect local environment (add --platform android, --format json) |
demi dev | Development loop with watch mode and hot reload |
demi editor | Launch the native editor |
demi run | Run the game (headless with DEMI_HEADLESS=1, or --max-frames N) |
demi run android --serial <device> | Build/install/launch on a device; --watch for cooked hot reload |
Validate and inspect
| Command | What it does |
demi validate [path] | Validate a project, scene, save, or directory (add --platform android) |
demi scene list <project> | List scene references |
demi scene inspect <scene> | Validate and summarize a scene |
demi scene diff <old> <new> | Deterministic structural scene diff (expanded documents) |
demi scene expand <scene> | Expand prefab instances |
demi hud inspect <hud.json> | Summarize HUD (flags: --safe-area, --reveal-hidden, --format) |
demi prefab inspect <prefab> | Summarize a prefab |
demi save inspect <save> | Validate and summarize a save |
demi script check <script> | Parse Lua with the embedded Lua 5.4 compiler and report diagnostics |
Assets and data
| Command | What it does |
demi asset inspect <asset.asset.json> | Validate and summarize an asset manifest |
demi asset deps <asset.asset.json> | List dependency asset IDs, then source-file paths |
demi asset import <source> --id asset://id | Copy a source into the project and write a manifest (disambiguate with --importer) |
demi asset reimport <asset.asset.json> | Refresh generated output, source hash, and metadata |
demi asset register-generated <source> --id asset://id | Register a tool-generated source under assets/ |
demi asset collider <model.asset.json> --id asset://… | Generate a collider asset from a model |
demi asset export --output file.demipack --asset asset://id | Export a portable asset pack (repeat --asset for several assets; required) |
demi asset import-package file.demipack | Verify and import a pack |
demi asset budget <demi.project.json> --platform android|linux | Inspect 3D performance budget usage |
Packages
| Command | What it does |
demi package add name@constraint | Resolve and add a dependency |
demi package remove name | Remove a direct dependency |
demi package install [--locked] [--offline] [--dry-run] | Install resolved packages into .demi/packages |
demi package update [name] | Update every package, or one |
demi package list|outdated [--format json] | Inspect resolved versions |
demi package publish [dir] --registry <url-or-path> | Publish a package |
demi package test [dir] | Run declared Lua package tests |
See Packages and the free package catalog.
Test, profile, and run
| Command | What it does |
demi test | Built-in scaffold checks |
demi test linux | Desktop E2E through the real runtime |
demi test android --serial <device> | Device E2E via adb (physical device) |
demi run --e2e-tests | Run project E2E scripts during launch |
demi run … --profiler | Print slow-frame details |
demi run … --profile-report report.csv | Aggregate profile report |
demi run … --profile-frames frames.csv | Per-frame scope totals |
demi run … --input-replay fixture.replay.json | Replay deterministic input frames |
demi run … --debug-overlays colliders,contacts,grid,… | Override project debug overlays |
demi run … --window-size WIDTHxHEIGHT | Initial desktop window size |
Build, cook, and export
| Command | What it does |
demi cook --platform linux | Validate and cook platform content |
demi build linux | Cook and package a Linux runtime bundle |
demi build apk | Package a debug APK (--configuration release, --gradle) |
demi build aab | Package an Android App Bundle |
demi capabilities export | Export component/capability metadata |
demi capabilities check [--baseline path] | Report capability deltas (text or JSON) |
demi capabilities verify-gates | Validate the reference capability manifest |
demi lua-stubs generate [directory] | Export LuaLS stubs (default .demi/lua) |
Exit codes
| Code | Meaning |
0 | Success |
1 | Validation or test failure |
2 | Usage error |
3 | Internal error |
Schema and capability exports are written atomically. Packaging is transactional: a failed or cancelled build leaves the previous artifact intact.