lunx.docs
DocsInstallation

Installation

Get Lunx running in under 60 seconds. Works with any framework — React, Vue, Svelte, Angular, and 15 more. Zero config out of the box.

✓ Updated for v1.0.2 — May 2026
Sub-40ms cold boot

Powered by uWebSockets.js and a native Rust file watcher — the fastest dev server in the ecosystem.

Built-in security

8-command native security pipeline. Secret scanning, CVE checks, SBOM generation, and SRI hashes — all zero-config.

19 framework adapters

React, Vue, Svelte, Angular, SvelteKit, Nuxt, Remix, Astro, Solid, Qwik, Tauri, Electron, and 7 more.

SQLite cache

Incremental build cache with 100% hit rate on unchanged files. Rebuild times under 4ms on warm cache.

Rust compiler core

SWC for TypeScript/JavaScript and LightningCSS for styles — running in parallel native threads.

18ms p99 HMR

Module-level hot reload without full page refresh. State is preserved across component updates.

Create a new project

The fastest way to start is with npm create lunx-dev@latest. It launches an interactive picker, lets you choose your framework, TypeScript, and CSS setup, and scaffolds a production-ready project in seconds.

bash
# Interactive scaffold — picks your framework for you
npm create lunx-dev@latest my-app

# Or with flags for fully non-interactive setup
npm create lunx-dev@latest my-app -- --framework react --ts --tailwind

cd my-app && npm install
npm run dev
Auto-detected framework
After running lunx create, pick your framework from the list. Lunx generates a minimal config with only the fields you need — everything else is inferred from the framework choice. You can always override defaults in lunx.config.ts.

Add to an existing project

Install Lunx as a dev dependency and add a minimal config file. Lunx reads your package.json to detect the framework automatically — no plugins needed.

bash
npm install --save-dev lunx-dev
NPM Package vs. CLI Command
The published package name on npm is lunx-dev (e.g. npm install -D lunx-dev or npm create lunx-dev@latest). Once installed, the terminal CLI command remains lunx (e.g. npx lunx dev, npx lunx build, npx lunx security).
typescriptlunx.config.ts
import { defineConfig } from 'lunx'

export default defineConfig({
  framework: 'react'
  // entry:   auto-detected from src/main.tsx or index.tsx
  // outDir:  defaults to dist/
  // preset:  'spa' implied for React
  // minify:  true in production, false in development
})

Start building

01
Run the dev server

Lunx starts a uWebSockets.js server with instant HMR. The adapter line confirms which framework was detected and the port it is serving on.

bash
npm run dev

 lunx v1.0.0  adapter: react  port: 5173
   - Local:   http://localhost:5173
   - Network: http://192.168.1.100:5173
    ready in 36ms
02
Build for production

Security scan runs automatically before writing any files to dist/. If a secret, CVE, or policy violation is found, the build aborts before anything is emitted to protect your CI pipeline.

bash
npm run build

🔍 Running security scan...
   0 secrets detected across 84 files
   0 CVEs found in 312 packages
   CycloneDX 1.5 SBOM written to dist/bom.json
   SHA-384 SRI hashes injected into index.html

📦 Building...
  dist/assets/main.b9ca.js   96.00 kB  gzip: 31.2 kB
  dist/index.html             0.62 kB  gzip:  0.4 kB
   built in 533ms
03
Preview the production build

Serve your production output locally before deploying to verify asset paths, SRI injection, and service worker registration.

bash
npm run preview

 lunx preview  serving dist/ at http://localhost:4173

System requirements

FieldTypeDefaultDescription
Node.jsruntime≥ 18.0.0LTS v20+ recommended. Node 16 is not supported.
npm / pnpm / yarnpackage manageranypnpm 9+ recommended for fastest installs and disk usage.
OSplatformanymacOS 12+, Linux (glibc ≥ 2.17), Windows 10+ all supported.
Rust (optional)toolchainstableOnly needed if rebuilding the native binary from source.
Using pnpm?
Add shamefully-hoist=true to your .npmrc if you see peer dependency warnings. Lunx works best with pnpm v9 and Node.js v20 LTS.