{"id":13766624,"url":"https://github.com/electron/packager","last_synced_at":"2026-02-13T12:36:13.719Z","repository":{"id":29177186,"uuid":"32707901","full_name":"electron/packager","owner":"electron","description":"Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI","archived":false,"fork":false,"pushed_at":"2026-01-06T03:15:30.000Z","size":4951,"stargazers_count":277,"open_issues_count":44,"forks_count":33,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-13T04:11:32.701Z","etag":null,"topics":["electron","electron-packager","hacktoberfest","javascript"],"latest_commit_sha":null,"homepage":"https://npm.im/@electron/packager","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/electron.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"malept","open_collective":"electron","tidelift":"npm/electron-packager"}},"created_at":"2015-03-23T02:54:14.000Z","updated_at":"2026-01-10T09:17:03.000Z","dependencies_parsed_at":"2023-12-13T01:27:53.861Z","dependency_job_id":"b8b22343-378a-4ff6-bb62-93b3fde6675f","html_url":"https://github.com/electron/packager","commit_stats":{"total_commits":1173,"total_committers":100,"mean_commits":11.73,"dds":0.5191815856777493,"last_synced_commit":"7024c67a22036100a701f00a3688fdae34a4034c"},"previous_names":["maxogden/atom-shell-packager","maxogden/electron-packager","electron-userland/electron-packager","electron/packager","electron/electron-packager"],"tags_count":121,"template":false,"template_full_name":null,"purl":"pkg:github/electron/packager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Fpackager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Fpackager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Fpackager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Fpackager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electron","download_url":"https://codeload.github.com/electron/packager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Fpackager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28472626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T22:13:38.078Z","status":"ssl_error","status_checked_at":"2026-01-15T22:12:11.737Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["electron","electron-packager","hacktoberfest","javascript"],"created_at":"2024-08-03T16:00:58.484Z","updated_at":"2026-01-15T22:21:25.440Z","avatar_url":"https://github.com/electron.png","language":"TypeScript","readme":"# @electron/packager\n\nPackage your [Electron](https://electronjs.org) app into OS-specific bundles (`.app`, `.exe`, etc.) via JavaScript or the command line.\n\n[![Test](https://github.com/electron/packager/actions/workflows/test.yml/badge.svg)](https://github.com/electron/packager/actions/workflows/test.yml)\n[![electron-nightly Canary](https://github.com/electron/packager/actions/workflows/canary.yml/badge.svg)](https://github.com/electron/packager/actions/workflows/canary.yml)\n[![Coverage Status](https://codecov.io/gh/electron/packager/branch/main/graph/badge.svg)](https://codecov.io/gh/electron/packager)\n[![npm](https://img.shields.io/npm/v/@electron/packager.svg?style=flat)](https://npm.im/@electron/packager)\n[![API docs](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.npmjs.org%2F%40electron%2Fpackager%2Flatest\u0026query=%24.version\u0026logo=typescript\u0026logoColor=white\u0026label=API%20Docs)](https://packages.electronjs.org/packager)\n[![Discord](https://img.shields.io/discord/745037351163527189?color=blueviolet\u0026logo=discord)](https://discord.com/invite/APGC3k5yaH)\n\n[Supported Platforms](#supported-platforms) |\n[Installation](#installation) |\n[Usage](#usage) |\n[Contributing](https://github.com/electron/packager/blob/main/CONTRIBUTING.md) |\n[Support](https://github.com/electron/packager/blob/main/SUPPORT.md) |\n[Related Apps/Libraries](#related) |\n[FAQ](https://github.com/electron/packager/blob/main/docs/faq.md) |\n[Release Notes](https://github.com/electron/packager/blob/main/NEWS.md)\n\n---\n\n## About\n\nElectron Packager is a command line tool and Node.js library that bundles Electron-based application\nsource code with a renamed Electron executable and supporting files into folders ready for distribution.\n\nFor creating distributables like installers and Linux packages, consider using either [Electron\nForge](https://github.com/electron/forge) (which uses Electron Packager\ninternally), or one of the [related Electron tools](#distributable-creators), which utilizes\nElectron Packager-created folders as a basis.\n\nNote that packaged Electron applications can be relatively large. A zipped, minimal Electron\napplication is approximately the same size as the zipped prebuilt binary for a given target\nplatform, target arch, and [Electron version](https://github.com/electron/electron/releases)\n_(files named `electron-v${version}-${platform}-${arch}.zip`)_.\n\n## Supported Platforms\n\nElectron Packager is known to run on the following **host** platforms:\n\n- Windows (32/64 bit)\n- macOS (formerly known as OS X)\n- Linux (x86/x86_64)\n\nIt generates executables/bundles for the following **target** platforms:\n\n- Windows (also known as `win32`, for x86, x86_64, and arm64 architectures)\n- macOS (also known as `darwin`) / [Mac App Store](https://electronjs.org/docs/tutorial/mac-app-store-submission-guide/) (also known as `mas`)\u003csup\u003e\\*\u003c/sup\u003e (for x86_64, arm64, and universal architectures)\n- Linux (for x86, x86_64, armv7l, arm64, and mips64el architectures)\n\n\u003csup\u003e*\u003c/sup\u003e *Note for macOS / Mac App Store target bundles: the `.app` bundle can only be signed when building on a host macOS platform.\\*\n\n## Installation\n\nThis module requires Node.js 22.12.0 or higher to run.\n\n```sh\nnpm install --save-dev @electron/packager\n```\n\nIt is **not** recommended to install `@electron/packager` globally.\n\n## Usage\n\n### Via JavaScript\n\nJavaScript API usage can be found in the [API documentation](https://packages.electronjs.org/packager).\n\n### From the command line\n\nRunning Electron Packager from the command line has this basic form:\n\n```sh\nnpx @electron/packager \u003csourcedir\u003e \u003cappname\u003e --platform=\u003cplatform\u003e --arch=\u003carch\u003e [optional flags...]\n```\n\nThis will:\n\n- Find or download the correct release of Electron\n- Use that version of Electron to create an app in `\u003cout\u003e/\u003cappname\u003e-\u003cplatform\u003e-\u003carch\u003e` _(this can be customized via an optional flag)_\n\n`--platform` and `--arch` can be omitted, in two cases:\n\n- If you specify `--all` instead, bundles for all valid combinations of target\n  platforms/architectures will be created.\n- Otherwise, a single bundle for the host platform/architecture will be created.\n\nFor an overview of the other optional flags, run `electron-packager --help` or see\n[usage.txt](https://github.com/electron/packager/blob/main/usage.txt). For\ndetailed descriptions, see the [API documentation](https://electron.github.io/packager/main/).\n\nFor flags that are structured as objects, you can pass each option as via dot notation as such:\n\n```sh\nnpx @electron/packager --flag.foo=\"bar\"\n# will pass in { flag: { foo: \"bar\"} } as an option to the Electron Packager API\n```\n\nIf `appname` is omitted, this will use the name specified by \"productName\" or \"name\" in the nearest package.json.\n\n**Characters in the Electron app name which are not allowed in all target platforms' filenames\n(e.g., `/`), will be replaced by hyphens (`-`).**\n\nYou should be able to launch the app on the platform you built for. If not, check your settings and try again.\n\n**Be careful** not to include `node_modules` you don't want into your final app. If you put them in\nthe `devDependencies` section of `package.json`, by default none of the modules related to those\ndependencies will be copied in the app bundles. (This behavior can be turned off with the\n`prune: false` API option or `--no-prune` CLI flag.) In addition, folders like `.git` and\n`node_modules/.bin` will be ignored by default. You can use `--ignore` to ignore files and folders\nvia a regular expression (_not_ a [glob pattern](https://en.wikipedia.org/wiki/Glob_%28programming%29)).\nExamples include `--ignore=\\.gitignore` or `--ignore=\"\\.git(ignore|modules)\"`.\n\n#### Example\n\nLet's assume that you have made an app based on the [minimal-repro](https://github.com/electron/minimal-repro)\nrepository on an Apple Silicon macOS device with the following file structure:\n\n```plaintext\nfoobar\n├── package.json\n├── index.html\n├── […other files, like the app's LICENSE…]\n└── script.js\n```\n\n…and that the following is true:\n\n- `@electron/packager` is installed locally\n- `productName` in `package.json` has been set to `Foo Bar`\n- The `electron` module is in the `devDependencies` section of `package.json`, and set to the exact version of `38.3.0`.\n- `npm install` for the `Foo Bar` app has been run at least once\n\nWhen one runs the following command for the first time in the `foobar` directory:\n\n```plaintext\nnpx @electron/packager .\n```\n\n`@electron/packager` will do the following:\n\n- Use the current directory for the `sourcedir`\n- Infer the `appname` from the `productName` in `package.json`\n- Infer the `appVersion` from the `version` in `package.json`\n- Infer the `platform` and `arch` from the host, in this example, `darwin` platform and `arm64` arch.\n- Download the darwin arm64 build of Electron 38.3.0 (and cache the downloads in `~/.electron`)\n- Build the macOS `Foo Bar.app`\n- Place `Foo Bar.app` in `foobar/Foo Bar-darwin-arm64/` (since an `out` directory was not specified, it used the current working directory)\n\nThe file structure now looks like:\n\n```plaintext\nfoobar\n├── Foo Bar-darwin-x64\n│   ├── Foo Bar.app\n│   │   └── […Mac app contents…]\n│   ├── LICENSE [the Electron license]\n│   └── version\n├── […other application bundles, like \"Foo Bar-win32-x64\" (sans quotes)…]\n├── package.json\n├── index.html\n├── […other files, like the app's LICENSE…]\n└── script.js\n```\n\nThe `Foo Bar.app` folder generated can be executed by a system running macOS, which will start the packaged Electron app.\nThis is also true of the Windows x64 build on a Windows device (via `Foo Bar-win32-x64/Foo Bar.exe`), and so on.\n\n## Related\n\n- [Electron Forge](https://github.com/electron/forge) - creates, builds, and distributes modern Electron applications\n\n### Distributable Creators\n\n- [electron-installer-zip](https://github.com/electron-userland/electron-installer-zip) - creates symlink-compatible ZIP files\n\nWindows:\n\n- [electron-winstaller](https://github.com/electron/windows-installer) - Squirrel.Windows-based installer from the Electron maintainers group\n- [electron-windows-msix](https://github.com/electron-userland/electron-windows-msix) - creates an MSIX package\n- [electron-windows-store](https://github.com/electron-userland/electron-windows-store) - creates an AppX package for the Windows Store\n- [electron-wix-msi](https://github.com/electron-userland/electron-wix-msi) - creates traditional MSI installers\n- [electron-installer-windows](https://github.com/electron-userland/electron-installer-windows) - alternative Squirrel.Windows-based installer\n\nmacOS:\n\n- [electron-installer-dmg](https://github.com/electron-userland/electron-installer-dmg) - creates a DMG\n\nLinux:\n\n- [electron-installer-debian](https://github.com/electron-userland/electron-installer-debian) - creates a DEB file\n- [electron-installer-redhat](https://github.com/electron-userland/electron-installer-redhat) - creates an RPM\n- [electron-installer-flatpak](https://github.com/endlessm/electron-installer-flatpak) - creates a Flatpak file\n- [electron-installer-snap](https://github.com/electron-userland/electron-installer-snap) - creates a Snap file\n\n### Plugins\n\nThese Node modules utilize Electron Packager API hooks:\n\n- [electron-packager-languages](https://npm.im/electron-packager-languages) - sets the locales\n  available to Electron when packaged, which is used by the Mac App Store, among other places\n- [electron-packager-plugin-non-proprietary-codecs-ffmpeg](https://www.npmjs.com/package/electron-packager-plugin-non-proprietary-codecs-ffmpeg) - replaces the normal version of FFmpeg in Electron with a version without proprietary codecs\n- [@electron/rebuild](https://github.com/electron/rebuild) - rebuilds native Node.js modules\n  against the packaged Electron version\n","funding_links":["https://github.com/sponsors/malept","https://opencollective.com/electron","https://tidelift.com/funding/github/npm/electron-packager"],"categories":["Tools"],"sub_categories":["For Electron"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron%2Fpackager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectron%2Fpackager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron%2Fpackager/lists"}