¶ Guide

Getting started

Install painda-wizard, configure your installer, and build the EXE.

Prerequisites

  • Node.js 18 or newer
  • An existing Electron app you can package with electron-builder --dir
  • A Windows host (or a Wine setup) to produce the EXE

1. Install

Add painda-wizard to your Electron project as a dev dependency.

terminal
npm install -D @painda/wizard

2. Initialize

Scaffold a starter config and an installer-assets/ folder.

terminal
npx painda init

This creates:

  • painda.config.ts — your installer configuration
  • installer-assets/ — drop your logo.png, license, privacy texts here
  • A build:installer script in package.json

3. Configure

Edit painda.config.ts. Set your app id, name, version, and point payload.from at the directory electron-builder produced.

painda.config.ts
import { defineConfig } from "@painda/wizard";

export default defineConfig({
  app: {
    id: "com.example.myapp",
    name: "My App",
    version: "1.0.0",
    publisher: "Acme Inc.",
  },
  branding: {
    primaryColor: "#4f46e5",
    logo: "./installer-assets/logo.png",
    theme: "auto",
  },
  payload: {
    from: "dist-electron-bin/win-unpacked",
    executable: "My App.exe",
  },
});
TipRun npx painda check at any point to validate your config without building.

4. Build your Electron app

Use electron-builder's --dir target to produce an unpacked Windows build. painda-wizard will wrap this output.

terminal
npx electron-builder --dir

Build the installer

Now run painda-wizard. The signed, branded installer EXE lands in dist-installer/.

terminal
npx painda build

What's next