lunx.docs
DocsInstallation

Installation

Install lunx-dev in under a minute. A 1.1 MB package whose bundler (Rolldown) and compiler (Oxc) run in Rust — nothing else to install.

✓ Updated for v1.2.0
Fast dev server

Boots in about 300 ms, ahead of Vite, Rspack and webpack on the same app, and serves your code without bundling it first.

Module Federation built in

Host/remote config with a webpack-compatible share scope — no webpack required. Dev and built apps mix freely.

Built-in security CLI

Secret scan, CVE/OSV, SBOM, SRI — uncommon for a bundler, zero extra tools.

Frameworks built by lunx

Every SPA framework plus SvelteKit, Nuxt, Remix, Astro and 8 more meta-frameworks on lunx's own engine. Next.js and 4 others run their own CLI.

Build cache

Unchanged projects skip the build; only changed components recompile. Output is identical with or without the cache.

Rust core, lean install

Rolldown bundles, Oxc compiles, LightningCSS styles. 1.1 MB package; no extra native download needed.

Create a new project

The fastest way to start is with npx lunx-dev@latest create. 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
npx lunx-dev@latest create my-app

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

cd my-app && npm install
npm run dev
What gets installed
lunx-dev (1.1 MB) and its dependencies, including Rolldown and Oxc, which ship prebuilt Rust binaries for macOS, Linux and Windows. Requires Node.js ^20.19.0 or >=22.12.0.

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 npx lunx-dev@latest create). 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-dev'

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
})

Check your setup

bash
npx lunx --version   # 1.2.0
npx lunx doctor      # environment and project health

Start building

01
Run the dev server

Lunx starts its dev server with HMR. The adapter line confirms which framework was detected and the port it is serving on.

bash
npm run dev

   ⚡ LUNX v1.2.0
   ▶  Core    Ready in 10ms
   ▶  Bundler Rolldown (production builds)
   Local    http://localhost:5173/
02
Production build

Rolldown bundles, Oxc compiles and minifies, and the security checks run. Unchanged projects skip the build.

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.