Installation

Get a NukeJS app running in under a minute.

Requirements

  • Node.js 20 or later
  • npm 9 or later (or pnpm / bun)

Create a new project

Run the create command and follow the prompts. It scaffolds a working app in seconds:

terminalbash
npm create nuke@latest

This creates a new directory with:

  • A home page at app/pages/index.tsx
  • A root layout at app/pages/layout.tsx
  • A sample API route in server/
  • A nuke.config.ts ready to customize

Start the dev server

terminalbash
cd my-app
npm run dev

The dev server starts at http://localhost:3000 by default. If port 3000 is in use it auto-increments to 3001, 3002, etc.

HMR is on by defaultHot Module Replacement is enabled in dev. Edit any file — the browser updates instantly without a full reload.

Add your first page

Create any .tsx file in app/pages/. The filename becomes the URL:

app/pages/about.tsxtypescript
export default function About() {
    return (
        <main>
            <h1>About us</h1>
            <p>Built with NukeJS.</p>
        </main>
    )
}

Visit http://localhost:3000/about — it's live, no config needed.

Install TypeScript types

NukeJS ships TypeScript types out of the box. If you need React types:

terminalbash
npm install -D @types/react

Upgrading

To upgrade NukeJS to the latest version, reinstall it from npm:

terminalbash
npm uninstall nukejs && npm i nukejs@latest

Then restart your dev server.