• Version 1.12.4
  • Published
  • 83.3 kB
  • 9 dependencies
  • MIT license


npm i @electron/get
yarn add @electron/get
pnpm add @electron/get


Utility for downloading artifacts from different versions of Electron



function download

download: (
version: string,
options?: ElectronDownloadRequestOptions
) => Promise<string>;
  • Downloads a specific version of Electron and returns an absolute path to a ZIP file.

    Parameter version

    The version of Electron you want to download

function downloadArtifact

downloadArtifact: (
_artifactDetails: ElectronPlatformArtifactDetailsWithDefaults
) => Promise<string>;
  • Downloads an artifact from an Electron release and returns an absolute path to the downloaded file.

    Parameter artifactDetails

    The information required to download the artifact

function getHostArch

getHostArch: () => string;
  • Generates an architecture name that would be used in an Electron or Node.js download file name, from the process module information.

function initializeProxy

initializeProxy: () => void;
  • Initializes a third-party proxy module for HTTP(S) requests.


interface ElectronDownloadRequest

interface ElectronDownloadRequest {}

    property artifactName

    artifactName: string;
    • The type of artifact. For example: * electron * ffmpeg

    property version

    version: string;
    • The version of Electron associated with the artifact.

    interface ElectronDownloadRequestOptions

    interface ElectronDownloadRequestOptions {}

      property cacheRoot

      cacheRoot?: string;
      • The directory that caches Electron artifact downloads.

        The default value is dependent upon the host platform:

        * Linux: $XDG_CACHE_HOME or ~/.cache/electron/ * MacOS: ~/Library/Caches/electron/ * Windows: %LOCALAPPDATA%/electron/Cache or ~/AppData/Local/electron/Cache/

      property downloader

      downloader?: Downloader<DownloadOptions>;
      • The custom [[Downloader]] class used to download artifacts. Defaults to the built-in [[GotDownloader]].

      property downloadOptions

      downloadOptions?: DownloadOptions;
      • Options passed to the downloader module.

      property force

      force?: boolean;
      • Whether to download an artifact regardless of whether it's in the cache directory.

        Defaults to false.

      property mirrorOptions

      mirrorOptions?: MirrorOptions;
      • Options related to specifying an artifact mirror.

      property tempDirectory

      tempDirectory?: string;
      • A temporary directory for downloads. It is used before artifacts are put into cache.

      property unsafelyDisableChecksums

      unsafelyDisableChecksums?: boolean;
      • When set to true, disables checking that the artifact download completed successfully with the correct payload.

        Defaults to false.

      interface MirrorOptions

      interface MirrorOptions {}

        property customDir

        customDir?: string;
        • The name of the directory to download from, often scoped by version number e.g 'v4.0.4'

        property customFilename

        customFilename?: string;
        • The name of the asset to download, e.g 'electron-v4.0.4-linux-x64.zip'

        property mirror

        mirror?: string;
        • The base URL of the mirror to download from, e.g https://github.com/electron/electron/releases/download

        property nightly_mirror

        nightly_mirror?: string;
        • DEPRECATED - see nightlyMirror.

        property nightlyMirror

        nightlyMirror?: string;
        • The Electron nightly-specific mirror URL.

        property resolveAssetURL

        resolveAssetURL?: (opts: DownloadOptions) => Promise<string>;
        • A function allowing customization of the url returned from getArtifactRemoteURL().

        Type Aliases

        type DownloadOptions

        type DownloadOptions = any;

          type ElectronArtifactDetails

          type ElectronArtifactDetails =
          | ElectronPlatformArtifactDetails
          | ElectronGenericArtifactDetails;

            type ElectronGenericArtifactDetails

            type ElectronGenericArtifactDetails = {
            isGeneric: true;
            } & ElectronDownloadRequest &

              type ElectronPlatformArtifactDetails

              type ElectronPlatformArtifactDetails = {
              * The target artifact platform. These are Node-style platform names, for example:
              * * `win32`
              * * `darwin`
              * * `linux`
              platform: string;
              * The target artifact architecture. These are Node-style architecture names, for example:
              * * `ia32`
              * * `x64`
              * * `armv7l`
              arch: string;
              artifactSuffix?: string;
              isGeneric?: false;
              } & ElectronDownloadRequest &

                type ElectronPlatformArtifactDetailsWithDefaults

                type ElectronPlatformArtifactDetailsWithDefaults =
                | (Omit<ElectronPlatformArtifactDetails, 'platform' | 'arch'> & {
                platform?: string;
                arch?: string;
                | ElectronGenericArtifactDetails;

                  type Omit

                  type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;

                    Package Files (4)

                    Dependencies (9)

                    Dev Dependencies (22)

                    Peer Dependencies (0)

                    No peer dependencies.


                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@electron/get.

                    • Markdown
                    • HTML
                      <a href="https://www.jsdocs.io/package/@electron/get"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>