Skip to content

Command Line ​

bash
npm install -g @desktopengine/sdk
desktopengine --help

folder defaults to the current folder. Projects with src/index.ts (or src/index.js) are bundled first and can use import, TypeScript and npm packages; projects without src/ are used as they are, with index.js at the root as the entry. See Projects and Builds.

create ​

bash
desktopengine create <type> <folder> [--renderer <renderer>] [--id <identifier>] [--name <name>]

Creates a project from a template.

ArgumentDescription
<type>wallpaper, widget or pet
<folder>The folder of the new project
--rendererA template drawn another way, only for wallpapers for now: webgl, three, pixi. Run npm install after creating a three or pixi project, see Drawing with WebGL or a rendering library
--idThe manifest's id, com.example.<folder name> by default
--nameThe manifest's name

dev ​

bash
desktopengine dev [folder] [options]

Runs the project in DesktopEngine, rebuilds and reloads it when files change, and prints its console output and uncaught exceptions. Press Ctrl-C to stop.

OptionDescription
--size small|medium|largeThe widget size; the first of widget.sizes when it isn't one of them
--level desktop|floatingOn the desktop, or above all windows; by default pets float above windows and the rest are on the desktop
--display <number>The display to run on, starting at 1; the main display by default
--spanA wallpaper across all displays, when manifest.json declares wallpaper.span
--param <key=value>The value of an option, can be repeated; the others take the manifest's default
--position <x,y>The window position
--port <port>The port to listen on, random by default
--perfShows the frame rate, frame time, CPU, wake-ups and memory, see Performance
--no-openPrints the URL that connects DesktopEngine instead of opening it

These options stand in for what the user picks in the details pane: the launchOptions your content reads are the same as once installed.

build ​

bash
desktopengine build [folder] [--minify]

Bundles src/index.(ts|js), the modules and npm packages it imports into one index.js, and puts it with the manifest and assets in dist/package/. --minify makes the bundle smaller.

validate ​

bash
desktopengine validate [folder]

Checks manifest.json and the entry by the app's rules, building src/ first. Exits with status 1 when there are errors, so it fits in CI.

pack ​

bash
desktopengine pack [folder] [--out <folder>] [--minify]

Builds, validates and zips the package into <id>-<version>.zip (in the project's dist/ by default), which File › Import… in DesktopEngine imports.

The SDK is released under the Apache License 2.0