{"id":13394432,"url":"https://github.com/nwutils/nw-builder","last_synced_at":"2026-02-14T12:03:16.302Z","repository":{"id":13415835,"uuid":"16104394","full_name":"nwutils/nw-builder","owner":"nwutils","description":"Build NW.js applications for Linux, MacOS and Windows","archived":false,"fork":false,"pushed_at":"2026-01-27T20:31:58.000Z","size":5506,"stargazers_count":1710,"open_issues_count":3,"forks_count":297,"subscribers_count":60,"default_branch":"main","last_synced_at":"2026-01-28T07:33:27.232Z","etag":null,"topics":["node-webkit","nwjs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/nw-builder","language":"JavaScript","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/nwutils.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"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":"ayushmanchhabra"}},"created_at":"2014-01-21T14:14:36.000Z","updated_at":"2026-01-27T20:31:35.000Z","dependencies_parsed_at":"2024-01-21T07:26:22.339Z","dependency_job_id":"8955315b-3fc5-4c73-86af-697e341c12c2","html_url":"https://github.com/nwutils/nw-builder","commit_stats":{"total_commits":893,"total_committers":95,"mean_commits":9.4,"dds":0.8107502799552071,"last_synced_commit":"89f7d64a8c62feef69b6ddaef00a5b1d8aef6f16"},"previous_names":["mllrsohn/nw-builder","mllrsohn/node-webkit-builder","nwjs-community/nw-builder"],"tags_count":115,"template":false,"template_full_name":null,"purl":"pkg:github/nwutils/nw-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwutils","download_url":"https://codeload.github.com/nwutils/nw-builder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwutils%2Fnw-builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28882743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T16:41:59.663Z","status":"ssl_error","status_checked_at":"2026-01-29T16:39:39.641Z","response_time":59,"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":["node-webkit","nwjs"],"created_at":"2024-07-30T17:01:19.526Z","updated_at":"2026-01-29T19:07:59.601Z","avatar_url":"https://github.com/nwutils.png","language":"JavaScript","readme":"# nw-builder\n\n[![npm](https://img.shields.io/npm/v/nw-builder/latest)](https://www.npmjs.com/package/nw-builder/v/latest)\n[![Join the chat at https://gitter.im/nwjs/nw-builder](https://badges.gitter.im/repo.svg)](https://app.gitter.im/#/room/#nwjs_nw-builder:gitter.im)\n\nBuild [NW.js](https://github.com/nwjs/nw.js) applications for Mac, Windows and Linux.\n\n## Major Features\n\n- Get, run or build applications.\n- Integrate [FFmpeg community builds](https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt)\n- Configure executable fields, icons and rename Helper apps\n- Downloading from mirrors\n\n## Table of Contents\n\n- [Installation](https://github.com/nwutils/nw-builder#install)\n- [Usage](https://github.com/nwutils/nw-builder#usage)\n- [Concepts](https://github.com/nwutils/nw-builder#concepts)\n- [API Reference](https://github.com/nwutils/nw-builder#api-reference)\n- [Guides](https://github.com/nwutils/nw-builder#guides)\n- [Contributing](https://github.com/nwutils/nw-builder#contributing)\n- [Roadmap](https://github.com/nwutils/nw-builder#roadmap)\n- [FAQ](https://github.com/nwutils/nw-builder#faq)\n- [License](https://github.com/nwutils/nw-builder#license)\n\n## Install\n\n```shell\nnpm i -D nw-builder\n```\n\nEvery NW.js release includes a modified Node.js binary at a specific version. It is recommended to [install](https://nodejs.org/en/download/package-manager) exactly that version on the host system. Not doing so may download ABI incompatible Node modules. Consult the NW.js [versions manifest](https://nwjs.io/versions.json) for what Node.js version to install. It is recommended to use a Node version manager (such as [volta](https://volta.sh), n, nvm, or nvm-windows) to be able to easily install and switch between Node versions.\n\n## Usage\n\nThis package can be used via a command line interface, be imported as a JavaScript module, or configured via the Node manifest as a JSON object. If options are defined in Node manifest, then they will be used over options defined in CLI or JavaScript API.\n\nCLI interface:\n\n```shell\nnwbuild --mode=build --glob=false --flavor=sdk --cacheDir=./node_modules/nw /path/to/project\n```\n\n\u003e Note: While using the CLI interface, `/path/to/project` refers to `options.srcDir` in the JavaScript API or JSON object.\n\nESM import:\n\n```javascript\nimport nwbuild from \"nw-builder\";\n```\n\nCJS import:\n\n```javascript\nlet nwbuild;\nimport(\"nw-builder\")\n  .then((moduleObject) =\u003e {\n    nwbuild = moduleObject;\n  })\n  .catch((error) =\u003e {\n    console.error(error);\n  });\n\nnwbuild({\n  mode: \"build\",\n  glob: false,\n  flavor: \"sdk\",\n  cacheDir: \"./node_modules/nw\",\n  srcDir: \"/path/to/project\",\n});\n```\n\nNode manifest usage:\n\n```json\n{\n    \"nwbuild\": {\n      \"mode\": \"build\",\n      \"glob\": false,\n      \"flavor\": \"sdk\",\n      \"cacheDir\": \"./node_modules/nw\",\n      \"srcDir\": \"/path/to/project\"\n    }\n}\n```\n\nSee `nw-builder` in action by building the demo application.\n\n1. `git clone https://github.com/nwutils/nw-builder`\n1. Run `npm run demo:bld:linux \u0026\u0026 npm run demo:exe:linux` to build and execute a Linux application.\n1. Run `npm run demo:bld:osx \u0026\u0026 npm run demo:exe:osx` to build and execute a MacOS application.\n1. Run `npm run demo:bld:win \u0026\u0026 npm run demo:exe:win` to build and execute a Windows application.\n\n\u003e From here on we will show `nw-builder` functionality by using the JavaScript module. Please note that the same functionality applies when using a command line or manifest file.\n\n## Concepts\n\n`nw-builder` can get, run and build NW.js applications. We refer to them as get, run and build modes.\n\n### Get Mode\n\nBy default you get the normal build of the latest NW.js release for your specific platform and arch. For more information, please refer to the API reference.\n\n```javascript\nnwbuild({\n  mode: \"get\"\n});\n```\n\nGet the community built FFmeg which contains proprietary codecs. This options is disabled by default. Please read the [license's constraints](https://nwjs.readthedocs.io/en/latest/For%20Developers/Enable%20Proprietary%20Codecs/#get-ffmpeg-binaries-from-the-community) before enabling this option.\n\n```javascript\nnwbuild({\n  mode: \"get\",\n  ffmpeg: true\n});\n```\n\nGet Node headers if you have to rebuild Node addons.\n\n```javascript\nnwbuild({\n  mode: \"get\",\n  nativeAddon: true,\n});\n```\n\n### Run Mode\n\n```javascript\nconst nwProcess = await nwbuild({\n  mode: \"run\",\n  srcDir: \"./app\",\n  glob: false,\n});\n```\n\nNote: The `nwProcess` is a [Node.js process](https://nodejs.org/api/process.html#process)\n\n### Build Mode\n\nBuild with defaults:\n\n```javascript\nnwbuild({\n  mode: \"build\",\n});\n```\n\n#### Managed Manifest\n\nYou can let `nw-builder` manage your node modules. The `managedManifest` options accepts a `boolean`, `string` or `object` type. It will then remove `devDependencies`, autodetect and download `dependencies` via the relevant `packageManager`. If none is specified, it uses `npm` as default.\n\nSetting it to `true` will parse the first Node manifest it encounters as the NW manifest.\n\n```javascript\nnwbuild({\n  mode: \"build\",\n  managedManifest: true,\n});\n```\n\nSetting it to a `string` implies that you are passing the file path to the NW manifest.\n\n```javascript\nnwbuild({\n  mode: \"build\",\n  managedManifest: \"./nw.js\",\n});\n```\n\nSetting it to a `object` implies you are directly passing the NW manifest as a JavaScript object.\n\n```javascript\nnwbuild({\n  mode: \"build\",\n  managedManifest: {\n    name: \"nwdemo\",\n    main: \"index.html\"\n  },\n});\n```\n\n## API Reference\n\nOptions\n\n| Name | Type    | Default   | Description |\n| ---- | ------- | --------- | ----------- |\n| mode | `\"get\" \\| \"run\" \\| \"build\"` | `\"build\"` | Choose between get, run or build mode |\n| version | `string \\| \"latest\" \\| \"stable\"` | `\"latest\"` | Runtime version |\n| flavor | `\"normal\" \\| \"sdk\"` | `\"normal\"` | Runtime flavor |\n| platform | `\"linux\" \\| \"osx\" \\| \"win\"` | | Host platform |\n| arch | `\"ia32\" \\| \"x64\" \\| \"arm64\"` | | Host architecture |\n| downloadUrl | `\"https://dl.nwjs.io\" \\| \"https://npm.taobao.org/mirrors/nwjs\" \\| https://npmmirror.com/mirrors/nwjs \\| \"https://github.com/corwin-of-amber/nw.js/releases/\"` | `\"https://dl.nwjs.io\"` | Download server. Supports file systems too (for example `file:///home/localghost/nwjs_mirror`) |\n| manifestUrl | `\"https://nwjs.io/versions.json\" \\| \"https://raw.githubusercontent.com/nwutils/nw-builder/main/src/util/osx.arm.versions.json\"` | `\"https://nwjs.io/versions.json\"` | Versions manifest URI, gotten via https or local file |\n| cacheDir | `string` | `\"./cache\"` | Directory to cache NW binaries |\n| cache | `boolean` | `true`| If true the existing cache is used. Otherwise it removes and redownloads it. |\n| ffmpeg | `boolean` | `false`| If true the chromium ffmpeg is replaced by community version with proprietary codecs. |\n| logLevel | `\"error\" \\| \"warn\" \\| \"info\" \\| \"debug\"` | `\"info\"`| Specify level of logging. |\n| shaSum | `boolean` | `true` | Flag to enable/disable shasum checks. |\n| srcDir | `string` | `\"./\"` | File paths to application code |\n| argv | `string[]` | `[]` | Command line arguments to pass to NW executable in run mode. You can also define these in `chromium-args` in NW.js manifest. |\n| glob | `boolean` | `true`| If true file globbing is enabled when parsing `srcDir`. |\n| outDir | `string` | `\"./out\"` | Directory to store build artifacts |\n| managedManifest | `boolean \\| string \\| object` | `false` | Managed manifest |\n| nodeAddon | `boolean` | `false` | Rebuild Node native addons |\n| zip | `boolean \\| \"zip\" \\| \"tar\" \\| \"tgz\"` | `false`| If true, \"zip\", \"tar\" or \"tgz\" the `outDir` directory is compressed. |\n| app | `LinuxRc \\| WinRc \\| OsxRc` | Additional options for each platform. (See below.)\n\n### `app` configuration object\n\nThis object defines additional properties used for building for a specific platform. For each platform, pass an object with appropriate values:\n\n#### Windows-specific options (`WinRc`)\n\n| Name | Type    | Default   | Description |\n| ---- | ------- | --------- | ----------- |\n| `icon` | `string` | `undefined` | The path to the icon file. It should be a .ico file. (**WARNING**: Please define the icon in the NW.js manifest instead) |\n| `name` | `string` | Value of `name` in NW.js manifest | The name of the application |\n| `version` | `string` | Value of `version` in NW.js manifest | The version of the application |\n| `comments` | `string` | `undefined` | Additional information that should be displayed for diagnostic purposes. |\n| `company` | `string` | Value of `author` in NW.js manifest | Company that produced the file—for example, Microsoft Corporation or Standard Microsystems Corporation, Inc. This string is required. |\n| `fileDescription` | `string` | Value of `description` in NW.js manifest | File description to be presented to users. This string may be displayed in a list box when the user is choosing files to install. For example, Keyboard Driver for AT-Style Keyboards. This string is required. |\n| `fileVersion` | `string` | Value of `version` or value of `version` in NW.js manifest | Version number of the file. For example, 3.10 or 5.00.RC2. This string is required. |\n| `internalName` | `string` | Value of `name` in NW.js manifest |Internal name of the file, if one exists—for example, a module name if the file is a dynamic-link library. If the file has no internal name, this string should be the original filename, without extension. This string is required. |\n| `legalCopyright` | `string` | `undefined` | Copyright notices that apply to the file. This should include the full text of all notices, legal symbols, copyright dates, and so on. This string is optional. |\n| `legalTrademark` | `string` | `undefined` | Trademarks and registered trademarks that apply to the file. This should include the full text of all notices, legal symbols, trademark numbers, and so on. This string is optional. |\n| `originalFilename` | `string` | Value of `name` option | Original name of the file, not including a path. This information enables an application to determine whether a file has been renamed by a user. The format of the name depends on the file system for which the file was created. This string is required. |\n| `privateBuild` | `string` | `undefined` | Information about a private version of the file—for example, Built by TESTER1 on \\\\TESTBED. |\n| `productName` | `string` | `name` in NW.js manifest | Name of the product with which the file is distributed. This string is required. |\n| `productVersion` | `string` | Value of `version` in NW.js manifest | Version of the product with which the file is distributed—for example, 3.10 or 5.00.RC2. |\n| `specialBuild` | `string` | `undefined` | Text that specifies how this version of the file differs from the standard version—for example, Private build for TESTER1 solving mouse problems on M250 and M250E computers. |\n| `languageCode` | `number` | `1033` | Language of the file, defined by Microsoft, see: https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a                                                                                                 |\n\n#### Linux-specific options (`LinuxRc`)\n\n| Name | Type    | Description |\n| ---- | ------- | ----------- |\n| name | `string` | Name of the application |\n| genericName | `string` | Generic name of the application |\n| noDisplay | `boolean` | If true the application is not displayed |\n| comment | `string` | Tooltip for the entry, for example \"View sites on the Internet\". |\n| icon | `string` | Icon to display in file manager, menus, etc. (**WARNING**: Please define the icon in the NW.js manifest instead) |\n| hidden | `boolean` | TBD |\n| onlyShowIn | `string[]` | A list of strings identifying the desktop environments that should display a given desktop entry |\n| notShowIn | `string[]` | A list of strings identifying the desktop environments that should not display a given desktop entry |\n| dBusActivatable | `boolean` | A boolean value specifying if D-Bus activation is supported for this application |\n| tryExec | `string` | Path to an executable file on disk used to determine if the program is actually installed |\n| exec | `string` | Program to execute, possibly with arguments. |\n| path | `string` | If entry is of type Application, the working directory to run the program in. |\n| terminal | `boolean` | Whether the program runs in a terminal window. |\n| actions | `string[]` | Identifiers for application actions. |\n| mimeType | `string[]` | The MIME type(s) supported by this application. |\n| categories | `string[]` | Categories in which the entry should be shown in a menu |\n| implements | `string[]` | A list of interfaces that this application implements. |\n| keywords | `string[]` | A list of strings which may be used in addition to other metadata to describe this entry. |\n| startupNotify | `boolean` | If true, it is KNOWN that the application will send a \"remove\" message when started with the DESKTOP_STARTUP_ID environment variable set. If false, it is KNOWN that the application does not work with startup notification at all. |\n| startupWMClass | `string` | If specified, it is known that the application will map at least one window with the given string as its WM class or WM name hin |\n| prefersNonDefaultGPU | `boolean` | If true, the application prefers to be run on a more powerful discrete GPU if available. |\n| singleMainWindow | `string` | If true, the application has a single main window, and does not support having an additional one opened. |\n\n#### MacOS-specific options (`OsxRc`)\n\n| Name | Type    | Description |\n| ---- | ------- | ----------- |\n| name | `string` | The name of the application |\n| icon | `string` | The path to the icon file. It should be a .icns file. (**WARNING**: Please define the icon in the NW.js manifest instead) |\n| LSApplicationCategoryType | `string` | The category that best describes your app for the App Store. |\n| CFBundleIdentifier | `string` | A unique identifier for a bundle usually in reverse DNS format. |\n| CFBundleName | `string` | A user-visible short name for the bundle. |\n| CFBundleDisplayName | `string` | The user-visible name for the bundle. |\n| CFBundleSpokenName | `string` | A replacement for the app name in text-to-speech operations. |\n| CFBundleVersion | `string` | The version of the build that identifies an iteration of the bundle. |\n| CFBundleShortVersionString | `string` | The release or version number of the bundle. |\n| NSHumanReadableCopyright | `string` | A human-readable copyright notice for the bundle. |\n| NSLocalNetworkUsageDescription | `string` | A human-readable description of why the application needs access to the local network. |\n\n\n## Guides\n\n### Get unofficial MacOS builds\n\nIf you're running older Apple machines, you can download the unofficial builds.\n\n\u003e Note: You will have to manually remove quarantine flag.\n\n```shell\nsudo xattr -r -d com.apple.quarantine /path/to/nwjs.app\n```\n\n```javascript\nnwbuild({\n  mode: \"get\",\n  platform: \"osx\",\n  arch: \"arm64\",\n  downloadUrl: \"https://github.com/corwin-of-amber/nw.js/releases/download\",\n  manifestUrl: \"https://raw.githubusercontent.com/nwutils/nw-builder/main/src/util/osx.arm.versions.json\",\n});\n```\n\n\u003e Note: Community FFmpeg binaries may not be available for unofficial builds. You will have to rebuild them yourself.\n\n### Get binaries via mirrors\n\nChina mirror:\n\n```javascript\nnwbuild({\n  mode: \"get\",\n  downloadUrl: \"https://npm.taobao.org/mirrors/nwjs\",\n});\n```\n\nSingapore mirror:\n\n```javascript\nnwbuild({\n  mode: \"get\",\n  downloadUrl: \"https://cnpmjs.org/mirrors/nwjs/\",\n});\n```\n\n## Contributing\n\n### External contributor\n\n- We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) style of commit messages.\n- On opening a new PR, the comments will guide you on how to construct the new PR.\n- Pull requests are squashed and merged onto the `main` branch.\n- PR title is used as commit's first line, PR description is used as commit body.\n- Only commit messages starting with `fix`, `feat` and `chore` are recognised by the Release Please bot.\n- Lint your code before commiting your change.\n- Add tests whenever possible.\n\n### Maintainer guidelines\n\n- Approve pull requests before merging.\n- Enforce conventional commits before merging pull requests.\n- A commit's first line should be formatted as `\u003ctype\u003e[optional scope]: \u003cdescription\u003e`.\n- A commit's body should have a description of changes in bullet points followed by any links it references or issues it fixes or closes.\n- Google's Release Please Action is used to update the changelog, bump the package version and generate GitHub releases.\n- NPM Publish Action publishes to `npm` if there is a version bump.\n- Every time `nw` is upgraded, the `volta` package should also be updated and `nw-builder` should create a minor release (since the underlying Node version is changed).\n\n## Roadmap\n\n### Bugs\n\n- Managed Manifest is broken. If glob is disabled and srcDir has no package.json, build fails.\n- Add back error, info, warn and debug logs\n\n### Features\n\n- feat(get): support canary releases\n- feat(pkg): add `AppImage` installer\n- feat(pkg): add `NSIS` installer\n- feat(pkg): add `DMG` installer\n- feat(get): add Linux ARM unofficial support\n- feat(bld): add source code protection\n- feat(pkg): add code signing\n\n### Chores\n\n- chore(docs): don't store JSDoc definitions in `typedef`s - get's hard to understand during development.\n- chore: annotate file paths as `fs.PathLike` instead of `string`.\n- chore(bld): factor out core build step\n- chore(bld): factor out linux config\n- chore(bld): factor out windows config\n- chore(bld): factor out native addon\n- chore(bld): factor out compressing\n- chore(bld): factor out managed manifest\n- chore(bld): move `.desktop` entry file logic to `create-desktop-shortcuts` package\n\n## FAQ\n\n## License\n\nMIT License.\n","funding_links":["https://github.com/sponsors/ayushmanchhabra"],"categories":["JavaScript","others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Fnw-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwutils%2Fnw-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwutils%2Fnw-builder/lists"}