Skip to content

Getting started

Lepton builds desktop applications with a Zig core and a web front end. The core opens the window and runs your commands; the page runs in the web engine the system already has: WPE WebKit on Linux, and WebView2 on Windows 10 and 11 in the 0.1.9 beta.

On every platform:

On Linux:

  • Wayland or X11
  • WPE WebKit 2.54 or newer, built with its WPE Platform API (pkg-config wpe-webkit-2.0 wpe-platform-2.0), and libsoup 3. The Platform API is stable and on by default since 2.54; libwpe and WPEBackend-fdo are not used on this path.

On Windows 0.1.9-beta.0, in the beta (npm create lepton-app@beta):

  • Windows 10 (1709 or later) or Windows 11
  • The WebView2 runtime, which comes with Windows; nothing ships with your app

lepton info checks the machine and says what is missing:

Terminal window
npx @lepton-desk/cli info

Not every distribution ships WPE WebKit 2.54; System requirements lists where to get it and what each platform needs.

Terminal window
npm create lepton-app@latest

The wizard asks for a name, a front end (plain TypeScript or JavaScript, React, Vue, Svelte, Solid; in the beta also Preact, Lit, Angular, Next.js and Astro) and how the app renders. Choose webview to load your page in the system’s web engine (WPE WebKit on Linux, WebView2 on Windows); native draws straight to the window with no web engine.

Without questions:

Terminal window
npm create lepton-app@latest hello-lepton -- --template react-ts --target webview --non-interactive

create-lepton-app installs the dependencies unless you pass --no-install. Lepton’s commands go through one script, lepton 0.1.5 (0.1.4 projects have lepton:dev and lepton:build); check and format run Biome, and the framework’s own dev, build and preview scripts stay. With npm put -- before flags; pnpm, Yarn and Bun don’t need it.

Terminal window
cd hello-lepton
npm run lepton dev

dev starts the front end’s dev server (Vite, or Astro’s, Next.js’s or Angular’s), builds the core once and opens the window once the server listens. Edits to the page reload it; the core is rebuilt only when you change Zig.

Terminal window
npm run lepton build # a release binary
npm run lepton package # .tar.gz on Linux, .zip on Windows; .deb, Arch and MSI on request

See Packaging for the formats, and The CLI for every command.