Nnextop / app

CLI — nextop

Provided by the nextop-app package (bin/cli.js), exposed as the nextop binary.

nextop dev

  1. On Windows, kills any stray electron.exe (taskkill /F /IM electron.exe /T).
  2. Compiles the Electron layer: tsc -p tsconfig.json.
  3. Copies electron/assets/**dist/electron/assets.
  4. Launches electron . with NODE_ENV=development, NEXTOP_RUNTIME=true.

The Next server runs in dev mode (dev: true, dir: cwd) — HMR and fast refresh work.

nextop build

  1. Compiles the Electron layer (tsc) + copies assets.
  2. next build (production .next output).
  3. electron-builder → distributable package in release/.

Packaging notes

  • asar: false — Next.js cannot read its files from inside an asar archive.
  • electron lives in devDependencies (electron-builder requirement); production node_modules (including next) ship automatically.
  • next.config.mjs sets images.unoptimized: true — the read-only package can't write the image optimization cache.
  • On Windows, electron-builder's winCodeSign extraction needs symlink privilege → enable Developer Mode or run the terminal as Administrator.