Configuration
All configuration for ende desktop lives in the desktop block in
ende.json. Most fields are optional; a project with no desktop block at all
still compiles, using sensible defaults.
Full example
{
"name": "my-app",
"version": "1.4.0",
"exports": "./main.ts",
"desktop": {
"app": {
"name": "My App",
"identifier": "com.example.myapp",
"icons": {
"macos": "./icons/app.icns",
"windows": "./icons/app.ico",
"linux": "./icons/app.png"
},
"deepLinks": ["myapp"]
},
"backend": "cef",
"output": {
"macos": "./dist/MyApp.app",
"windows": "./dist/MyApp",
"linux": "./dist/my-app"
},
"macos": {
"codesignIdentity": "Developer ID Application: Acme, Inc. (TEAMID)"
},
"release": {
"baseUrl": "https://releases.example.com/my-app"
},
"errorReporting": {
"url": "https://errors.example.com/report"
},
"initialWindow": {
"width": 1024,
"height": 720
}
}
}app
Metadata baked into the compiled binary.
app.name
Display name of the application. Used as the macOS menu bar app name, the
Windows taskbar tooltip, and the Linux .desktop entry name. When no output
path is set, it also names the built app, and so becomes the default window
title; with an output path, the window title defaults to the output's name.
Without app.name, the app is named after its output path (desktop.output or
--output), or else after the entrypoint's file name, or its folder for
main.ts, mod.ts, index.ts and cli.ts. The name field at the root of
ende.json isn't used.
app.identifier
Reverse-DNS bundle / application identifier (e.g. com.example.myapp). Set it
for every app you ship: the identifier is the key to the app's data, so changing
it later starts the app with empty storage.
It names:
- The page's origin,
app://<identifier>lowercased, with the webview backend on macOS and Windows (see HTTP serving). The page'slocalStorageand IndexedDB are kept per origin. - The folder of the runtime's own storage (
localStorageandcachesin your Ende code):<data dir>/<identifier>/storage, where<data dir>is~/Library/Application Supporton macOS,%LOCALAPPDATA%on Windows and$XDG_DATA_HOME(usually~/.local/share) on Linux. Inside that folder the storage is also keyed by the app's name, so renaming the built app starts this storage empty even when the identifier stays the same. - The WebView2 data folder on Windows,
%LOCALAPPDATA%\<identifier>\WebView2. - The
app://cookie file on macOS,~/Library/Application Support/<identifier>/cookies.json. - The macOS
CFBundleIdentifierand the Linux.desktopfile identifier. - The MSI's upgrade code on Windows, which lets a newer installer replace an
older one. Without
app.identifier, the MSI usessh.ende.desktop.<app name>with the app name only lowercased, not the derived identifier described below.
macOS also needs a stable identifier to grant notification permission, so an app that uses notifications needs one too.
Because the identifier becomes a URL host, it must be a valid domain name:
dot-separated labels of 1 to 63 letters, digits or hyphens, not starting or
ending with a hyphen, and a last label that isn't a number. It can't be
localhost or end in .localhost. ende desktop fails with an error naming
desktop.app.identifier when it doesn't fit. An identifier that isn't in
reverse-DNS form at all (no ., or characters other than letters, digits, -
and .) fails a macOS build, and other builds warn and use the derived
identifier described below instead.
When app.identifier is unset, ende desktop warns and derives one from the
app name: sh.ende.desktop.<name>, where <name> is the app name lowercased,
with every run of characters other than letters and digits turned into a single
- (my_app becomes sh.ende.desktop.my-app). Renaming the app then changes
the identifier, and the app loses its storage.
Ende 2026.11.10
The identifier names the app's origin and storage folder. Apps built with
earlier releases kept the runtime's storage in <data dir>/<app name>; that
folder is moved to <data dir>/<identifier>/storage on the first launch, if
the new folder doesn't exist yet. On macOS, the derived bundle identifier of
some app names (such as my_app) changed to match the origin, and
ende desktop warns when it does: an installed copy loses its notification
permission and WebKit data once.
app.icons
Per-platform icon paths, relative to the directory you run ende desktop from.
"icons": {
"macos": "./icons/app.icns",
"windows": "./icons/app.ico",
"linux": "./icons/app.png"
}
Each platform also accepts an array of PNGs at specific sizes. macOS assembles
them into an .icns file and Windows into an .ico file at build time; Linux
uses the largest one:
"icons": {
"macos": [
{ "path": "./icons/16.png", "size": 16 },
{ "path": "./icons/32.png", "size": 32 },
{ "path": "./icons/128.png", "size": 128 },
{ "path": "./icons/256.png", "size": 256 },
{ "path": "./icons/512.png", "size": 512 }
]
}
.icns (macOS) and .ico (Windows) inputs are passed through unchanged. A
single .png also works on macOS and Linux.
ende desktop uses the entry for the OS it builds for: the OS of --target, or
of the host without it. --all-targets uses each target's own entry. The
--icon CLI flag overrides it for one build.
If no icons entry is set for a platform, the default Ende icon is used.
app.deepLinks
Custom URL schemes (deep links) the app registers with the OS, so that opening a
<scheme>://... link routes to your app. Each entry is a bare scheme name with
no ://.
"deepLinks": ["myapp"]
With the above, the OS treats myapp://open/document/42 as belonging to your
app. List several schemes if your app handles more than one:
"deepLinks": ["myapp", "myapp-beta"]
Scheme names follow the
RFC 3986 grammar:
they must start with an ASCII letter and may otherwise contain letters, digits,
+, -, and .. Names are lowercased during registration. The reserved
schemes http, https, file, ftp, ws, and wss are rejected, since
registering them as app handlers would hijack normal browsing. An invalid or
reserved scheme fails the build.
Registration happens at bundle time, per platform:
- macOS adds a
CFBundleURLTypesentry (with your schemes underCFBundleURLSchemes) to the bundleInfo.plist. This is written before code-signing so the signature stays valid. - Linux adds an
x-scheme-handler/<scheme>MIME type to the.desktopentry and ensuresExec=forwards the opened URL via the%ufield code. - Windows has no in-bundle registration for protocol handlers, so the
bundler drops a
register-deep-links.batnext to the launcher. It writes theHKCU\Software\Classes\<scheme>keys pointing back at the launcher. An installer (or the user) runs it once after install.
Registration only
This registers the schemes with the OS so links are routed to your app. Handling the opened URL inside a running app (delivering the URL to your code) is coming in a later release; declare your schemes now so packaging and OS registration are in place.
backend
Which web rendering engine to embed. One of "cef", "webview", or "raw".
Default: "webview".
"backend": "webview"
The CLI flag --backend (webview, cef or raw) overrides this for one
build. See Backends for tradeoffs and supported
targets.
output
Per-platform output paths.
"output": {
"macos": "./dist/MyApp.app",
"windows": "./dist/MyApp",
"linux": "./dist/my-app"
}
The path's extension determines what is produced:
| Extension on macOS | Output |
|---|---|
.app |
macOS application bundle |
.dmg |
DMG disk image (built via hdiutil) |
| Extension on Windows | Output |
|---|---|
| (none) / directory | App directory with <name>.exe and <name>.dll |
.msi |
Windows Installer package |
| Extension on Linux | Output |
|---|---|
| (none) / directory | App directory with the app binary |
.AppImage |
.AppImage single-file bundle |
.deb |
Debian/Ubuntu package |
.rpm |
Fedora/RHEL package |
ende desktop uses the path for the OS it builds for: the OS of --target, or
of the host without it. --all-targets uses each target's own path. The CLI
flag --output overrides it for one build.
Ende 2026.11.10
output and app.icons follow --target. Earlier releases always used the
entry for the host's OS.
macos
macOS-specific build options.
macos.codesignIdentity
The code-signing identity used to sign the macOS bundle, e.g.
"Developer ID Application: Acme, Inc. (TEAMID)", or "-" for an explicit
ad-hoc signature. When unset, ende desktop still ad-hoc-signs the bundle so it
has a stable code identity (required for notification permission), but the
result is not distributable without further signing. Set a real Developer ID
identity to produce a notarizable bundle. See
Distribution.
release
Configuration for the auto-update system.
release.baseUrl
Base URL of the release server. The runtime fetches <baseUrl>/latest.json and
downloads patch files relative to this URL. See
Auto-update for the full manifest format and
patch flow.
"release": {
"baseUrl": "https://releases.example.com/my-app"
}
This is the only server URL the runtime polls automatically.
Ende.autoUpdate() defaults to this URL, and
can override it per call unless release.publicKey is
set. Without publicKey, ende desktop warns that the app will install
unsigned updates (Ende NEXT_RELEASE+).
release.publicKey
The Ed25519 public key update manifests must be signed with, as standard padded
base64 of the 32-byte key (Ende NEXT_RELEASE+). It's built into the app, and an
update is then staged only if its manifest is signed with this key and offers a
newer version than the running app. Ende.autoUpdate() throws when it's passed
a url or publicKey different from the ones set here. See
Signed manifests.
"release": {
"baseUrl": "https://releases.example.com/my-app",
"publicKey": "<base64-encoded 32-byte Ed25519 public key>"
}
It requires release.baseUrl, and a top-level version that is ChronVer
(YYYY.MM.DD[.N]) or semver, so the app can refuse older updates. Use one key
per app: with a key shared across apps, one app's signed patch can be served to
another.
errorReporting
Capture uncaught exceptions, unhandled rejections, and panics, show a native
alert, and optionally POST a JSON report to a server.
errorReporting.url
"errorReporting": {
"url": "https://errors.example.com/report"
}
If unset, error reporting is in "alert only" mode: uncaught errors still show a native alert, but no report is sent.
See Error reporting for the report schema.
initialWindow
The window the app starts with. It's created before your code runs, and the
first Ende.BrowserWindow your
code creates adopts it, so set its creation-time options here.
"initialWindow": {
"width": 1024,
"height": 720,
"frameless": true,
"showOnFirstLoad": false
}
| Field | Type | Default | Notes |
|---|---|---|---|
width |
integer | 800 |
Width in pixels, 1 to 65535. |
height |
integer | 600 |
Height in pixels, 1 to 65535. |
frameless |
boolean | false |
Remove the title bar and standard window chrome. |
noActivate |
boolean | false |
Floating, non-activating panel that doesn't take key focus when shown. |
transparentTitlebar |
boolean | false |
Make the title bar transparent. |
transparent |
boolean | false |
Transparent window background (macOS and Linux with the webview backend). |
showOnFirstLoad |
boolean | true |
Show the window once its first page has loaded. false keeps it hidden until show(). |
An invalid value fails ende desktop.
Ende 2026.11.10
The initialWindow section is new in this release.
Working directory & assets
The compiled binary runs with the current working directory set to the user's
cwd, not the directory containing the binary. If your app needs to find files
relative to itself (framework build outputs, static assets), use import.meta
or the framework's own resolution; do not assume
Ende.cwd().
ende desktop needs an explicit entrypoint and doesn't detect frameworks. To
ship build output or other static assets, include them in the binary with
--include and read them relative to your module, for example with
new URL("./dist/", import.meta.url).
Validation
ende desktop checks the desktop section before it builds and fails with an
error that names the key:
- Each section (
app,app.icons,output,release,errorReporting,macos,initialWindow) must be an object, and unknown keys are errors. initialWindowvalues must have the right type and range (for exampleinvalid "initialWindow.width").app.identifiermust be a valid host (seeapp.identifier).app.deepLinksentries must be valid, non-reserved URL schemes.release.publicKeymust decode to a 32-byte Ed25519 public key (invalid "release.publicKey"), and needsrelease.baseUrl("release.publicKey" needs "release.baseUrl"). With it set, the top-levelversionmust be ChronVer or semver (Ende NEXT_RELEASE+).
A missing icon file is reported as a warning, and the app is built without that icon.