¶ Guide

CLI

painda-wizard ships a single CLI binary with three subcommands. Run it via npx or as an npm script.

Synopsis

terminal
painda <command> [options]

Commands:
  init    Scaffold painda.config.ts and wire up package.json scripts
  build   Build the installer EXE from your config
  check   Validate the config without building

Options:
  -V, --version   Show version
  -h, --help      Show help

painda init

Scaffolds a starter painda.config.ts in the current directory and creates an installer-assets/ folder. Optionally injects a build:installer script into your package.json.

terminal
npx painda init [--force] [--no-scripts]

Flags

  • -f, --force — overwrite an existing painda.config.ts
  • --no-scripts — skip injecting scripts into package.json

painda build

Builds the installer EXE from your config. Loads painda.config.ts via jiti, validates it with Zod, stages the runtime, merges your branding and payload, and produces the final installer in output.dir.

terminal
npx painda build [--config <path>] [--verbose]

Flags

  • -c, --config <path> — path to config file or directory (default: cwd)
  • -v, --verbose — verbose logging, including stack traces on error

Build pipeline

  • Load & validate config
  • Verify payload directory exists
  • Stage runtime + branding + payload
  • Inject runtime config
  • Run electron-builder against the staged runtime
  • Code-sign (if configured)
  • Output the final .exe

painda check

Validates your config and reports the resolved app, payload, and output paths. Does not build anything. Use this in CI as a fast pre-flight check.

terminal
npx painda check [--config <path>]

Flags

  • -c, --config <path> — path to config file or directory (default: cwd)

npm scripts

After running painda init, your package.json contains:

package.json
{
  "scripts": {
    "build:installer": "painda build"
  }
}

Combine with electron-builder for a full pipeline:

package.json
{
  "scripts": {
    "build:app": "electron-builder --dir",
    "build:installer": "painda build",
    "ship": "npm run build:app && npm run build:installer"
  }
}