# @electron/fuses

> Flip Electron Fuses and customize your packaged build of Electron

Latest version **2.1.3** (published 2026-06-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @electron/fuses
pnpm add @electron/fuses
yarn add @electron/fuses
bun add @electron/fuses
```

Provides the command `electron-fuses`.

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 2.1.3 |
| Published | 2026-06-29 |
| First published | 2021-04-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=22.12.0 |
| Dependencies | 0 |
| Unpacked size | 39.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 54 |
| Author | Electron Community |
| Maintainers | electron-cfa |
| Keywords | electron, fuses |

## Links

- npm: https://www.npmjs.com/package/@electron/fuses
- Repository: https://github.com/electron/fuses
- Homepage: https://github.com/electron/fuses#readme
- Issues: https://github.com/electron/fuses/issues
- npm.io page: https://npm.io/package/@electron/fuses

## Recent versions

- 2.1.3 (latest) — 2026-06-29
- 2.1.2 — 2026-06-05
- 2.1.1 — 2026-03-27
- 2.1.0 — 2026-02-26
- 2.0.0 — 2025-08-01
- 1.8.0 — 2024-03-25
- 1.7.0 — 2023-12-10
- 1.6.2 — 2023-08-02
- 1.6.1 — 2022-10-05
- 1.6.0 — 2022-09-22
- 1.5.0 — 2021-09-09
- 1.4.0 — 2021-08-09
- 1.3.0 — 2021-08-04
- 1.2.1 — 2021-06-11
- 1.2.0 — 2021-06-10
- … 5 more at https://npm.io/package/@electron/fuses/versions

## README

# @electron/fuses

> Flip [Electron Fuses](https://github.com/electron/electron/blob/main/docs/tutorial/fuses.md) and customize your packaged build of Electron

[![Test](https://github.com/electron/fuses/actions/workflows/test.yml/badge.svg)](https://github.com/electron/fuses/actions/workflows/test.yml)
[![npm version](http://img.shields.io/npm/v/@electron/fuses.svg)](https://npmjs.org/package/@electron/fuses)
[![API docs](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fregistry.npmjs.org%2F%40electron%2Ffuses%2Flatest&query=%24.version&logo=typescript&logoColor=white&label=API%20Docs)](https://packages.electronjs.org/fuses)

## Usage

### Via JavaScript

```typescript
import { flipFuses, FuseVersion, FuseV1Options } from '@electron/fuses';

// Call this after your app has been packaged (all files in place) but
// before code signing. This fits naturally in an electron-builder
// `afterPack` hook or an electron-forge `postPackage`/`packageAfterCopy` hook.
await flipFuses(
  require('electron'), // Returns the path to the electron binary
  {
    version: FuseVersion.V1,
    [FuseV1Options.RunAsNode]: false, // Disables ELECTRON_RUN_AS_NODE
    [FuseV1Options.EnableCookieEncryption]: true, // Enables cookie encryption
    [FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, // Disables the NODE_OPTIONS environment variable
    [FuseV1Options.EnableNodeCliInspectArguments]: false, // Disables the --inspect and --inspect-brk family of CLI options
    [FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, // Enables validation of the app.asar archive on macOS
    [FuseV1Options.OnlyLoadAppFromAsar]: true, // Enforces that Electron will only load your app from "app.asar" instead of its normal search paths
    [FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]: true, // Loads V8 Snapshot from `browser_v8_context_snapshot.bin` for the browser process
    [FuseV1Options.GrantFileProtocolExtraPrivileges]: true, // Grants the file protocol extra privileges
    [FuseV1Options.WasmTrapHandlers]: true, // Enables V8 signal handlers to trap Out of Bounds memory access from WebAssembly
  },
);
```

For full API usage, see the [API documentation](https://packages.electronjs.org/fuses).

### From the command line

```sh
$ npx @electron/fuses read --app /Applications/Foo.app
$ npx @electron/fuses write --app /Applications/Foo.app <...key=on/off>
```

### Apple Silicon

For `arm64` macOS builds of your app, you will need to pass `resetAdHocDarwinSignature: true` to the `flipFuses` method
if you are not immediately codesigning your app after flipping the fuses. Otherwise, the app will refuse to launch with
code signature validation errors. This is a security measure on Apple Silicon devices.

```typescript
import { flipFuses, FuseVersion, FuseV1Options } from '@electron/fuses';

await flipFuses(
  require('electron'),
  {
    version: FuseVersion.V1,
    resetAdHocDarwinSignature: targetPlatform === 'darwin' && targetArch === 'arm64',
    [FuseV1Options.RunAsNode]: false,
  },
);
```

### New Fuses

If you want to ensure you provide a config for new fuses when upgrading Electron major versions,
you can set the `strictlyRequireAllFuses` option to `true`.

This will hard fail the build if you are on a version of `@electron/fuses` that doesn't have configuration
options for every fuse in the Electron binary you are targeting or if you don't provide a configuration
for a specific fuse present in the Electron binary you are targeting.

```typescript
import { flipFuses, FuseVersion, FuseV1Options } from '@electron/fuses';

await flipFuses(
  require('electron'),
  {
    version: FuseVersion.V1,
    strictlyRequireAllFuses: true,
    [FuseV1Options.RunAsNode]: false,
  },
);
```

---
_Source: https://npm.io/package/@electron/fuses · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
