ende desktop

ende desktop compiles an Ende project into a self-contained desktop application. The output binary bundles your code, the Ende runtime, and a rendering backend into one redistributable executable per platform.

ende desktop main.ts
ende desktop --hmr main.ts
ende desktop --output MyApp.app main.ts

This page covers the command-line flags. For the full guide (backends, Ende.BrowserWindow, bindings, auto-update, DevTools, and distribution) see the Desktop apps section.

Runtime flags

ende desktop accepts the same runtime and permission flags as ende run. The permissions you grant at compile time are baked into the compiled binary:

ende desktop --allow-read --allow-net main.ts

Backend

--backend selects the rendering engine. It accepts webview (the default), cef, or raw, and overrides the desktop.backend field in ende.json. See Backends for the tradeoffs.

ende desktop --backend webview main.ts

Build output

--output (-o) sets the output path; its extension determines the format (.app, .dmg, .AppImage, and so on):

ende desktop --output ./dist/MyApp.dmg main.ts

An .msi upgrades an installed copy only if the version in ende.json is higher, so bump it for every MSI release: a rebuild of the same version installs as a repair. See Distribution.

--compress makes the packaged app self-extracting: the payload is compressed inside the app and unpacked on first launch. It's off by default. --compress alone uses xz; --compress=zstd is faster to unpack but needs the zstd tool on the user's machine. See Compressing the bundle.

Use --icon to set the application icon (.ico on Windows, .icns or .png on macOS), and --include / --exclude to add or remove files from the compiled binary. In ende.json, set icons with desktop.app.icons (see Configuration) and files with the include and exclude lists of the compile block, which ende desktop uses too (see Compile config).

Cross-compilation

--target builds for another platform, and --all-targets builds for every supported platform at once. No platform-specific toolchain is needed on the host:

ende desktop --target aarch64-apple-darwin main.ts
ende desktop --all-targets main.ts

See Distribution for the supported target triples and output formats.

Development

--hmr runs the app with hot module replacement during development. See Hot module replacement.

ende desktop --hmr main.ts

The --inspect, --inspect-wait, and --inspect-brk flags attach a debugger to both the Ende runtime and the renderer. --inspect-renderer overrides the CEF renderer's debugger listen address. See DevTools.

Configuration

Most settings can live in the desktop block of ende.json instead of being passed on every build:

ende.json
{
  "desktop": {
    "app": {
      "name": "MyApp",
      "identifier": "com.example.myapp",
      "icons": {
        "macos": "./icons/icon.icns",
        "windows": "./icons/icon.ico",
        "linux": "./icons/icon.png"
      }
    },
    "backend": "cef",
    "output": {
      "macos": "./dist/macos",
      "windows": "./dist/windows",
      "linux": "./dist/linux"
    },
    "release": { "baseUrl": "https://updates.example.com" },
    "errorReporting": { "url": "https://errors.example.com/report" },
    "initialWindow": { "width": 1024, "height": 720 }
  }
}

The output and icons entries used are the ones for the OS of --target, or of the host without it. initialWindow sets the window the app starts with (Ende 2026.11.10+); see initialWindow.

For the full schema, see Configuration.