Configuration
Every option you can set in painda.config.ts. Use defineConfig() to get full TypeScript autocomplete and Zod validation.
Full example
A complete painda.config.ts with every section enabled:
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.",
publisherUrl: "https://example.com",
tagline: "A demo app",
},
branding: {
primaryColor: "#4f46e5",
accentColor: "#a855f7",
logo: "./installer-assets/logo.png",
icon: "./installer-assets/icon.ico",
theme: "auto",
},
pages: {
welcome: { title: "Welcome", subtitle: "Version 1.0.0" },
license: { file: "./installer-assets/license.txt", mustScroll: true },
privacy: { file: "./installer-assets/privacy.txt" },
options: {
defaultPath: "${LOCALAPPDATA}/Programs/${appId}",
desktopShortcut: true,
startMenuShortcut: true,
launchOnStartup: false,
},
finish: {
runApp: true,
links: [{ label: "Documentation", url: "https://example.com/docs" }],
},
},
payload: {
from: "dist-electron-bin/win-unpacked",
executable: "My App.exe",
},
output: {
dir: "dist-installer",
filename: "${name}-Setup-${version}.exe",
arch: "x64",
},
signing: {
certificateFile: "./certs/code-signing.pfx",
certificatePasswordEnv: "PAINDA_CERT_PASSWORD",
},
});app
Identity and metadata for your application.
app.idstringrequireddefault: —Reverse-DNS app id, e.g.
com.acme.myapp. Used for the install directory and Windows registry keys. Alphanumeric, dots, dashes only.app.namestringrequireddefault: —Display name shown throughout the wizard, e.g.
"My App".app.versionstringrequireddefault: —Semantic version, e.g.
"1.2.3".app.publisherstringdefault: "Unknown Publisher"Publisher name shown in Add/Remove Programs and on the certificate.
app.publisherUrlstring (URL)Optional publisher website. Rendered as a link on the Finish page.
app.taglinestringOptional one-line tagline shown on the Welcome page.
branding
Visual identity for the installer. See Branding for a deeper guide.
branding.primaryColorhex stringdefault: "#4f46e5"Primary brand color used for buttons and accents.
branding.accentColorhex stringOptional secondary accent color.
branding.logostring (path)Path to a square PNG (≥ 256×256) shown in the wizard header.
branding.iconstring (path)Path to a custom
.ico for the installer EXE itself.branding.backgroundImagestring (path)Path to an optional sidebar / welcome background image.
branding.fontFamilystringCSS font-family value. Defaults to a system stack.
branding.theme"light" | "dark" | "auto"default: "auto"Visual mode for the wizard.
auto follows the system theme.pages
Enable or disable each wizard page and configure its content. See Wizard pages for the full guide.
welcome
welcome.titlestringOverride the welcome heading.
welcome.subtitlestringSubtitle below the title.
welcome.bodystringBody paragraph.
license
license.filestring (path)requiredPath to a
.txt or .md file with the license / terms of service text.license.mustScrollbooleandefault: falseRequire the user to scroll to the bottom before they can accept.
privacy
privacy.filestring (path)requiredPath to the privacy policy file.
options
options.allowChangeInstallPathbooleandefault: trueLet the user change the install location.
options.defaultPathstringdefault: "${LOCALAPPDATA}/Programs/${appId}"Default install dir. Tokens:
${LOCALAPPDATA}, ${PROGRAMFILES}, ${appId}, ${appName}.options.desktopShortcutbooleandefault: truePre-check the desktop shortcut box.
options.startMenuShortcutbooleandefault: truePre-check the Start Menu entry box.
options.launchOnStartupbooleandefault: falsePre-check the autostart-on-boot box.
finish
finish.runAppbooleandefault: trueShow a checkbox to launch the app after install completes.
finish.links{ label, url }[]Array of links shown on the Finish page.
payload
The already-built Electron binary that should be installed.
payload.fromstring (path)requiredDirectory containing the unpacked app — typically
electron-builder's win-unpacked/ output.payload.executablestringrequiredRelative path to the main
.exe inside from.payload.excludestring[]Optional file glob patterns to exclude when packaging.
output
output.dirstringdefault: "dist-installer"Output directory for the produced installer.
output.filenamestringdefault: "${name}-Setup-${version}.exe"Filename template. Tokens:
${name}, ${version}, ${arch}.output.arch"x64" | "arm64"default: "x64"Target architecture.
signing
Optional Authenticode code-signing config.
signing.certificateFilestring (path)Path to a
.pfx code-signing certificate.signing.certificatePasswordEnvstringdefault: "PAINDA_CERT_PASSWORD"Name of the environment variable holding the certificate password.
signing.timestampUrlstring (URL)default: "http://timestamp.digicert.com"RFC 3161 timestamp server URL.
NoteNever hard-code the certificate password in your config. Use an environment variable and store it securely (e.g. CI secret).
hooks
hooks.preInstallstring (path)JS file executed inside the installer before extracting the payload.
hooks.postInstallstring (path)JS file executed after extracting the payload, before shortcuts are created.