Getting Started
Install LightShell and create your first desktop app in under 5 minutes.
LightShell lets you build native desktop apps using only JavaScript, HTML, and CSS. No Rust, no Go knowledge needed. This guide gets you from zero to a running desktop app in under 5 minutes.
Prerequisites
Section titled “Prerequisites”- macOS (arm64 or x64) or Linux (x64 or arm64 with WebKitGTK 2.40+)
- Node.js 18+ and npm
You do not need Go installed. The pre-compiled LightShell binary is downloaded automatically via npm.
Install
Section titled “Install”npm install -g lightshellThis installs the lightshell CLI globally. The correct platform-specific binary is selected automatically.
Create a New Project
Section titled “Create a New Project”lightshell init my-appcd my-appThis creates a new directory with the following structure:
my-app/ lightshell.json # App configuration src/ index.html # Entry point app.js # Application logic style.css # StylesThe lightshell.json file defines your app’s name, window size, and other settings. The src/ directory contains your web code.
Run in Development Mode
Section titled “Run in Development Mode”lightshell devThis launches your app in a native window with:
- Hot reload — edit any file in
src/and the app refreshes instantly - DevTools — enabled by default in dev mode for debugging
- A local HTTP server serving your files
You should see a native window open with your app running inside it.
Build for Distribution
Section titled “Build for Distribution”lightshell buildThis compiles your app into a native binary:
- macOS: produces a
.appbundle indist/ - Linux: produces an AppImage in
dist/
The build output includes the final binary size. A typical app comes in at ~2.8MB.
✓ Built my-app in 1.2s → 2.8MB✓ Output: dist/MyApp.appWhat Just Happened?
Section titled “What Just Happened?”When you ran lightshell build, here is what happened behind the scenes:
- Your HTML, CSS, and JS files were embedded into a Go binary using
embed.FS - The binary includes a thin runtime that opens a native window with the system webview (WKWebView on macOS, WebKitGTK on Linux)
- Your code runs inside the webview with access to native APIs via
window.lightshell.* - The result is a single native executable with no external dependencies
You never wrote Go. You never configured a build system. You wrote JS and got a native app.
Next Steps
Section titled “Next Steps”- Build your first real app — a step-by-step tutorial
- Use native APIs — file system, dialogs, clipboard, and more
- API Reference — complete documentation for every API