# Desktop release npm scripts



Pear Electron repositories wrap [`electron-forge`](https://www.electronforge.io/) behind `package.json` scripts so day-to-day work stays predictable. This page lists the script names used by [`hello-pear-electron`](https://github.com/holepunchto/hello-pear-electron#scripts)—the template every snippet in [Ship your app](/p2p/getting-started/build-a-peer-to-peer-chat/ship) and [Deploy over-the-air updates](/p2p/getting-started/build-a-peer-to-peer-chat/update) is built from. Your project may rename them; read `package.json` locally.

## `npm start` [#npm-start]

Starts the app in development mode with OTA disabled, so a seeded `pear://` link does not replace your working tree while you hack:

```sh
# package.json
"start": "electron-forge start -- --no-updates"
```

To exercise the OTA path locally, drop the flag with an explicit `--updates`:

```sh
npm start -- --updates
```

## `npm run lint` / `npm run format` [#npm-run-lint--npm-run-format]

Run [Prettier](https://prettier.io/) and the project's linter ([`lunte`](https://www.npmjs.com/package/lunte) in the template):

```sh
# package.json
"lint": "prettier --check . && lunte",
"format": "prettier --write . && lunte --fix"
```

Exact tools vary—inspect `scripts` in your repo.

## `npm run package` [#npm-run-package]

Runs `electron-forge package` to produce a packaged app **without** the per-OS distributables (no `.app`/`.msix`/`.AppImage`). Useful for a quick smoke test:

```sh
# package.json
"package": "electron-forge package"
```

## `npm run make` [#npm-run-make]

Runs `electron-forge make` and produces platform-native installers for the **current host OS**, as defined in [`forge.config.js`](https://github.com/holepunchto/hello-pear-electron/blob/main/forge.config.js):

```sh
# package.json
"make": "electron-forge make"
```

| Host OS | Typical outputs (template makers)                                                                                                                    |
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| macOS   | `.app` (packager) + `.dmg` (`@electron-forge/maker-dmg`)                                                                                             |
| Windows | `.msix` (`@electron-forge/maker-msix`) under `out/<AppName>-win32-<arch>/`                                                                           |
| Linux   | `.AppImage` (`pear-electron-forge-maker-appimage`), `.flatpak` (`pear-electron-forge-maker-flatpak`), and `.snap` (`pear-electron-forge-maker-snap`) |

Run `npm run make` on each OS (or CI worker) you need before [`pear build`](/pear/how-to/operate-an-app/build-and-package/build-desktop-distributables#build-the-deployment-directory). There are no separate `make:darwin` / `make:linux` / `make:win32` scripts in the current template.

Unsigned local builds are fine on the machine that made them; production paths need vendor signing—see [Build desktop distributables](/pear/how-to/operate-an-app/build-and-package/build-desktop-distributables) for `MAC_CODESIGN_IDENTITY`, `KEYCHAIN_PROFILE`, and `WINDOWS_SIGN_HOOK`.

## Where to go next [#where-to-go-next]

* [Build desktop distributables](/pear/how-to/operate-an-app/build-and-package/build-desktop-distributables)—signing, notarization, MSIX publisher, and the `pear build` deployment directory layout.
* [Deploy your application](/pear/how-to/operate-an-app/manual-deployment/deployment)—stage, provision, and multisig once the deployment directory exists.
* [Getting started—part 3 (ship)](/p2p/getting-started/build-a-peer-to-peer-chat/ship) and [part 4 (update)](/p2p/getting-started/build-a-peer-to-peer-chat/update)—type-along walkthrough of the whole flow.
* [Release pipeline](/pear/explanation/deployment-releasing-apps-p2p)—how the scripts above feed into trust boundaries and release lines.
