{"id":13406871,"url":"https://github.com/electron-userland/electron-builder","last_synced_at":"2026-02-01T00:31:55.535Z","repository":{"id":32421396,"uuid":"35998691","full_name":"electron-userland/electron-builder","owner":"electron-userland","description":"A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box","archived":false,"fork":false,"pushed_at":"2025-05-12T15:56:34.000Z","size":167635,"stargazers_count":14057,"open_issues_count":338,"forks_count":1777,"subscribers_count":148,"default_branch":"master","last_synced_at":"2025-05-12T16:53:07.246Z","etag":null,"topics":["appx","auto-update","builder","contributions-welcome","deb","distribution-electron","dmg","electron","electron-builder","electron-updater","help-wanted","linux","macos","msi","muon","nsis","pkg","rpm","snap","squirrel"],"latest_commit_sha":null,"homepage":"https://www.electron.build","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electron-userland.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["mmaietta"],"custom":"https://www.electron.build/donate"}},"created_at":"2015-05-21T07:45:02.000Z","updated_at":"2025-05-12T15:59:31.000Z","dependencies_parsed_at":"2024-01-23T21:57:00.868Z","dependency_job_id":"391d2d42-dc0a-4615-8eae-7c074a4640f0","html_url":"https://github.com/electron-userland/electron-builder","commit_stats":{"total_commits":3153,"total_committers":560,"mean_commits":5.630357142857143,"dds":0.4934982556295592,"last_synced_commit":"5c4472510a9dbefbe781aaa50252d9ad78b9f8ed"},"previous_names":["loopline-systems/electron-builder"],"tags_count":983,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Felectron-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Felectron-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Felectron-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron-userland%2Felectron-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electron-userland","download_url":"https://codeload.github.com/electron-userland/electron-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253785015,"owners_count":21963903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appx","auto-update","builder","contributions-welcome","deb","distribution-electron","dmg","electron","electron-builder","electron-updater","help-wanted","linux","macos","msi","muon","nsis","pkg","rpm","snap","squirrel"],"created_at":"2024-07-30T19:02:41.662Z","updated_at":"2026-02-01T00:31:55.528Z","avatar_url":"https://github.com/electron-userland.png","language":"TypeScript","readme":"# electron-builder [![npm version](https://img.shields.io/npm/v/electron-builder.svg?label=latest)](https://www.npmjs.com/package/electron-builder) [![downloads per month](https://img.shields.io/npm/dm/electron-builder.svg)](https://yarn.pm/electron-builder) [![donate](https://img.shields.io/badge/donate-donorbox-brightgreen.svg)](https://www.electron.build/donate)\nA complete solution to package and build a ready for distribution [Electron](https://electronjs.org), [Proton Native](https://proton-native.js.org/) app for macOS, Windows and Linux with “auto update” support out of the box. 📦\n\nAlways looking for community contributions! 👀 Setting up a [dev environment](https://github.com/electron-userland/electron-builder/blob/master/CONTRIBUTING.md) is easy to do 🪩\n\n## Sponsors\n\n\u003ctable\u003e\n   \u003ctr align=\"center\"\u003e\n      \u003ctd\u003e\n         \u003ca href=\"https://workflowy.com\"\u003e\n            \u003cdiv\u003e\n               \u003cimg src=\"https://workflowy.com/media/i/icon-28x28.png\" alt=\"WorkFlowy\" title=\"WorkFlowy\" style=\"height: 50px;\" height=\"50\"/\u003e\n            \u003c/div\u003e\n            Notes, Tasks, Projects.\u003cbr\u003eAll in a Single Place.\n         \u003c/a\u003e\n         \u003cbr\u003e\n      \u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr align=\"center\"\u003e\n      \u003ctd\u003e\n         \u003cbr\u003e\n         \u003ca href=\"https://tidepool.org\"\u003e\n            \u003cdiv\u003e\n               \u003cimg src=\"https://www.electron.build/sponsor-logos/Tidepool_Logo_Light.svg\" alt=\"Tidepool\" title=\"Tidepool\" style=\"height: 75px;\" height=\"75\" /\u003e\n            \u003c/div\u003e\n            Your gateway to understanding your diabetes data\n         \u003c/a\u003e\n         \u003cbr\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n         \u003cbr\u003e\n         \u003ca href=\"https://keygen.sh/?via=electron-builder\"\u003e\n            \u003cdiv\u003e\n               \u003cimg src=\"https://keygen.sh/images/logo-pill.png\" alt=\"Keygen\" title=\"Keygen\" style=\"height: 75px;\" height=\"75\" /\u003e\n            \u003c/div\u003e\n            An open, source-available software licensing and distribution API\n         \u003c/a\u003e\n         \u003cbr\u003e\n      \u003c/td\u003e\n   \u003c/tr\u003e\n   \u003ctr align=\"center\"\u003e\n      \u003ctd\u003e\n         \u003cbr\u003e\n         \u003ca href=\"https://www.todesktop.com/electron?utm_source=electron-builder\"\u003e\n            \u003cdiv\u003e\n               \u003cimg src=\"https://www.todesktop.com/new-logo/todesktop-logo.png\" alt=\"ToDesktop\" title=\"ToDesktop\" style=\"height: 75px;\" height=\"75\" /\u003e\n            \u003c/div\u003e\n            ToDesktop: An all-in-one platform for building and releasing Electron apps\n         \u003c/a\u003e\n         \u003cbr\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n         \u003cbr\u003e\n         \u003ca href=\"https://www.dashcam.io/?ref=electron_builder\"\u003e\n            \u003cdiv\u003e\n               \u003cimg src=\"https://user-images.githubusercontent.com/318295/226675216-ab6aad0c-526c-4a45-a0a8-3906ac614b8b.png\" alt=\"Dashcam\" title=\"Dashcam\" style=\"height: 75px;\" height=\"75\" /\u003e\n            \u003c/div\u003e\n            Dashcam: Capture the steps to reproduce any bug with video crash reports for Electron.\n         \u003c/a\u003e\n         \u003cbr\u003e\n      \u003c/td\u003e\n   \u003c/tr\u003e\n\u003c/table\u003e\n\n\n## Documentation\n\nSee the full documentation on [electron.build](https://www.electron.build).\n\n* NPM packages management:\n    * [Native application dependencies](https://electron.atom.io/docs/tutorial/using-native-node-modules/) compilation (including [Yarn](http://yarnpkg.com/) support).\n    * Development dependencies are never included. You don't need to ignore them explicitly.\n    * [Two package.json structure](https://www.electron.build/tutorials/two-package-structure) is supported, but you are not forced to use it even if you have native production dependencies.\n* [Code Signing](https://www.electron.build/code-signing) on a CI server or development machine.\n* [Auto Update](https://www.electron.build/auto-update) ready application packaging.\n* Numerous target formats:\n    * All platforms: `7z`, `zip`, `tar.xz`, `tar.7z`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir` (unpacked directory).\n    * [macOS](https://www.electron.build/mac): `dmg`, `pkg`, `mas`.\n    * [Linux](https://www.electron.build/linux): [AppImage](http://appimage.org), [snap](http://snapcraft.io), debian package (`deb`), `rpm`, `freebsd`, `pacman`, `p5p`, `apk`.\n    * [Windows](https://www.electron.build/win): `nsis` (Installer), `nsis-web` (Web installer), `portable` (portable app without installation), AppX (Windows Store), MSI, Squirrel.Windows.\n* [Publishing artifacts](https://www.electron.build/publish) to GitHub Releases, Amazon S3, DigitalOcean Spaces and Bintray.\n* Advanced building:\n    * Pack in a distributable format [already packaged app](https://www.electron.build/#pack-only-in-a-distributable-format).\n    * Separate [build steps](https://github.com/electron-userland/electron-builder/issues/1102#issuecomment-271845854).\n    * Build and publish in parallel, using hard links on CI server to reduce IO and disk space usage.\n    * [electron-compile](https://github.com/electron/electron-compile) support (compile for release-time on the fly on build).\n* [Docker](https://www.electron.build/multi-platform-build#docker) images to build Electron app for Linux or Windows on any platform.\n* [Proton Native](https://www.electron.build/configuration/#proton-native) support.\n* Downloads all required tools files on demand automatically (e.g. to code sign windows application, to make AppX), no need to setup.\n\n| Question                               | Answer                                                                            |\n| -------------------------------------- | --------------------------------------------------------------------------------- |\n| “I want to configure electron-builder” | [See options](https://electron.build/configuration)                 |\n| “I found a bug or I have a question”   | [Open an issue](https://github.com/electron-userland/electron-builder/issues/new) |\n| “I want to support development”        | [Donate](https://www.electron.build/donate)                                       |\n\n## Installation\n```\nyarn add electron-builder --dev\n// or npm, pnpm, bun\n```\n\n### Note for Yarn 3\n\nYarn 3 use PnP by default, but electron-builder still needs node-modules (ref: [yarnpkg/berry#4804](https://github.com/yarnpkg/berry/issues/4804#issuecomment-1234407305)). Add configuration in the `.yarnrc.yaml` as follows:\n```\nnodeLinker: \"node-modules\"\n```\nThis will declare to use node-modules instead of PnP.\n\n## Quick Setup Guide\n\n[electron-webpack-quick-start](https://github.com/electron-userland/electron-webpack-quick-start) is a recommended way to create a new Electron application. See [Boilerplates](https://www.electron.build/#boilerplates).\n\n1. Specify the standard fields in the application `package.json` — [name](https://electron.build/configuration.html#metadata), `description`, `version` and [author](https://docs.npmjs.com/files/package.json#people-fields-author-contributors).\n\n2. Specify the [build](https://www.electron.build/configuration.html#build) configuration in the `package.json` as follows:\n    ```json\n    \"build\": {\n      \"appId\": \"your.id\",\n      \"mac\": {\n        \"category\": \"your.app.category.type\"\n      }\n    }\n    ```\n   See [all options](https://www.electron.build/configuration). Option [files](https://www.electron.build/contents#files) to indicate which files should be packed in the final application, including the entry file, maybe required.\n   You can also use separate configuration files, such as `js`, `ts`, `yml`, and `json`/`json5`. See [read-config-file](https://www.npmjs.com/package/read-config-file) for supported extensions. [JS Example for programmatic API](https://www.electron.build/programmatic-usage)\n\n3. Add [icons](https://www.electron.build/icons).\n\n4. Add the [scripts](https://docs.npmjs.com/cli/run-script) key to the development `package.json`:\n    ```json\n    \"scripts\": {\n      \"app:dir\": \"electron-builder --dir\",\n      \"app:dist\": \"electron-builder\"\n    }\n    ```\n    Then you can run `yarn app:dist` (to package in a distributable format (e.g. dmg, windows installer, deb package)) or `yarn app:dir` (only generates the package directory without really packaging it. This is useful for testing purposes).\n\n    To ensure your native dependencies are always matched electron version, simply add script `\"postinstall\": \"electron-builder install-app-deps\"` to your `package.json`.\n\n5. If you have native addons of your own that are part of the application (not as a dependency), set [nodeGypRebuild](https://www.electron.build/configuration.html#nodegyprebuild) to `true`.\n\nPlease note that everything is packaged into an asar archive [by default](https://electron.build/configuration.html#asar).\n\nFor an app that will be shipped to production, you should sign your application. See [Where to buy code signing certificates](https://www.electron.build/code-signing#where-to-buy-code-signing-certificate).\n\n## Programmatic Usage\nSee `node_modules/electron-builder/out/index.d.ts`. Typings for TypeScript are provided and also can be found [here](https://www.electron.build/electron-builder/globals).\n\nCode snippet provided below is also shown \"in action\" [here](https://www.electron.build/programmatic-usage) as well.\n```js\n\"use strict\"\n\nconst builder = require(\"electron-builder\")\nconst Platform = builder.Platform\n\n// Promise is returned\nbuilder.build({\n  targets: Platform.MAC.createTarget(),\n  config: {\n   \"//\": \"build options, see https://www.electron.build/\"\n  }\n})\n  .then(() =\u003e {\n    // handle result\n  })\n  .catch((error) =\u003e {\n    // handle error\n  })\n```\n\n## Community Boilerplates\n\n* [electron-react-boilerplate](https://github.com/chentsulin/electron-react-boilerplate) A boilerplate for scalable cross-platform desktop apps.\n* [electron-vue-vite](https://github.com/caoxiemeihao/electron-vue-vite) A real simple Electron + Vue3 + Vite5 boilerplate.\n* [vite-electron-builder](https://github.com/cawa-93/vite-electron-builder) Secure boilerplate for Electron app based on Vite. Supports multiple frameworks.\n* [electronjs-with-nextjs](https://github.com/saulotarsobc/electronjs-with-nextjs) ElectronJS application with NextJS and TypeScript.\n\n## Debug\n\nSet the `DEBUG` environment variable to debug what electron-builder is doing:\n```bash\nDEBUG=electron-builder\n```\n\n`FPM_DEBUG` env to add more details about building linux targets (except snap and appimage).\n\n`DEBUG_DMG=true` env var to add more debugging/verbosity from `hdiutil` (macOS).\n\n!!! tip \"cmd\"\n    On [Windows](https://github.com/visionmedia/debug#windows-command-prompt-notes) the environment variable is set using the set command.\n    ```bash\n    set DEBUG=electron-builder\n    ```\n\n!!! tip \"PowerShell\"\n    PowerShell uses different syntax to set environment variables.\n    ```bash\n    $env:DEBUG = \"electron-builder\"\n    ```\n\n## Donate\n\nWe do this open source work in our free time. If you'd like us to invest more time on it, please [donate](https://www.electron.build/donate).\n","funding_links":["https://github.com/sponsors/mmaietta","https://www.electron.build/donate"],"categories":["TypeScript","HarmonyOS","Library","前端开发框架及项目","JavaScript","打包，发布和更新","三、开发者必备工具","Tools","AppImage developer tools"],"sub_categories":["Windows Manager","Packager/Installer","其他_文本生成、文本对话","1. 构建与打包","For Electron","Deployment tools for Electron applications"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron-userland%2Felectron-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectron-userland%2Felectron-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron-userland%2Felectron-builder/lists"}