{"id":14978513,"url":"https://github.com/electron/fuses","last_synced_at":"2025-05-16T14:05:27.037Z","repository":{"id":45496507,"uuid":"300769672","full_name":"electron/fuses","owner":"electron","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-02T00:02:55.000Z","size":286,"stargazers_count":50,"open_issues_count":7,"forks_count":23,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-07T22:25:51.157Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-03T01:07:53.000Z","updated_at":"2025-05-05T02:03:22.000Z","dependencies_parsed_at":"2023-02-18T19:45:52.711Z","dependency_job_id":"4e998968-8bc4-4d15-ae38-290905af000e","html_url":"https://github.com/electron/fuses","commit_stats":{"total_commits":67,"total_committers":15,"mean_commits":4.466666666666667,"dds":0.7761194029850746,"last_synced_commit":"5faeb8db32f95e759646ab7e000295fab08829df"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Ffuses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Ffuses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Ffuses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/electron%2Ffuses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/electron","download_url":"https://codeload.github.com/electron/fuses/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"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":[],"created_at":"2024-09-24T13:57:49.630Z","updated_at":"2025-05-16T14:05:27.016Z","avatar_url":"https://github.com/electron.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @electron/fuses\n\n\u003e Flip [Electron Fuses](https://github.com/electron/electron/blob/main/docs/tutorial/fuses.md) and customize your packaged build of Electron\n\n[![Test](https://github.com/electron/fuses/actions/workflows/test.yml/badge.svg)](https://github.com/electron/fuses/actions/workflows/test.yml)\n[![npm version](http://img.shields.io/npm/v/@electron/fuses.svg)](https://npmjs.org/package/@electron/fuses)\n\n## Usage\n\n### Via JavaScript\n\n```typescript\nimport { flipFuses, FuseVersion, FuseV1Options } from '@electron/fuses';\n\n// During your build / package process\nawait flipFuses(\n  require('electron'), // Returns the path to the electron binary\n  {\n    version: FuseVersion.V1,\n    [FuseV1Options.RunAsNode]: false, // Disables ELECTRON_RUN_AS_NODE\n    [FuseV1Options.EnableCookieEncryption]: true, // Enables cookie encryption\n    [FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, // Disables the NODE_OPTIONS environment variable\n    [FuseV1Options.EnableNodeCliInspectArguments]: false, // Disables the --inspect and --inspect-brk family of CLI options\n    [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, // Enables validation of the app.asar archive on macOS\n    [FuseV1Options.OnlyLoadAppFromAsar]: true, // Enforces that Electron will only load your app from \"app.asar\" instead of its normal search paths\n    [FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]: true, // Loads V8 Snapshot from `browser_v8_context_snapshot.bin` for the browser process\n    [FuseV1Options.GrantFileProtocolExtraPrivileges]: true, // Grants the file protocol extra privileges\n  },\n);\n```\n\n### From the command line\n\n```sh\n$ npx @electron/fuses read --app /Applications/Foo.app\n$ npx @electron/fuses write --app /Applications/Foo.app \u003c...key=on/off\u003e\n```\n\n### Apple Silicon\n\nFor `arm64` macOS builds of your app if you are not immediately codesigning your app after flipping\nthe fuses you will need to pass `resetAdHocDarwinSignature: true` to the `flipFuses` method.  Otherwise\nthe app will refuse to launch with code signature validation errors.  This is a new security measure on\nApple Silicon devices.\n\n```typescript\nimport { flipFuses, FuseVersion, FuseV1Options } from '@electron/fuses';\n\nawait flipFuses(\n  require('electron'),\n  {\n    version: FuseVersion.V1,\n    resetAdHocDarwinSignature: targetPlatform === 'darwin' \u0026\u0026 targetArch === 'arm64',\n    [FuseV1Options.RunAsNode]: false,\n  },\n);\n```\n\n### New Fuses\n\nIf you want to ensure you provide a config for every fuse, even newly added fuses during Electron upgrades\nyou can set the `strictlyRequireAllFuses` option to `true`. This will hard fail the build if you are on\na version of `@electron/fuses` that doesn't have configuration options for every fuse in the Electron binary\nyou are targetting or if you don't provide a configuration for a specific fuse present in the Electron binary\nyou are targetting.\n\n```typescript\nimport { flipFuses, FuseVersion, FuseV1Options } from '@electron/fuses';\n\nawait flipFuses(\n  require('electron'),\n  {\n    version: FuseVersion.V1,\n    strictlyRequireAllFuses: true,\n    [FuseV1Options.RunAsNode]: false,\n  },\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron%2Ffuses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felectron%2Ffuses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felectron%2Ffuses/lists"}