Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on macOS
Download Electron release artifacts
Saved setup from 8 h ago
Will it work on macOS?
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
Needs Git: xcode-select --install
git clone https://github.com/electron/get.git cd get
Node.js 22.23.4
# needs nvm: brew install nvm (or https://github.com/nvm-sh/nvm) nvm install nvm use
corepack enable yarn install
yarn test
For full API details, see the API documentation.
import { download } from '@electron/get';
// NB: Use this syntax within an async function, Node does not have support for
// top-level await as of Node 12.
const zipFilePath = await download('4.0.4');
import { downloadArtifact } from '@electron/get';
// NB: Use this syntax within an async function, Node does not have support for
// top-level await as of Node 12.
const zipFilePath = await downloadArtifact({
version: '4.0.4',
platform: 'darwin',
artifactName: 'electron',
artifactSuffix: 'symbols',
arch: 'x64',
});
To specify another location to download Electron assets from, the following options are available:
mirrorOptions Object
mirror String (optional) - The base URL of the mirror to download from.nightlyMirror String (optional) - The Electron nightly-specific mirror URL.customDir String (optional) - The name of the directory to download from, often scoped by version number.customFilename String (optional) - The name of the asset to download.resolveAssetURL Function (optional) - A function allowing customization of the url used to download the asset.Anatomy of a download URL, in terms of mirrorOptions:
https://github.com/electron/electron/releases/download/v4.0.4/electron-v4.0.4-linux-x64.zip
| | | |
------------------------------------------------------- -----------------------------
| |
mirror / nightlyMirror | | customFilename
------
||
customDir
Example:
import { download } from '@electron/get';
const zipFilePath = await download('4.0.4', {
mirrorOptions: {
mirror: 'https://mirror.example.com/electron/',
customDir: 'custom',
customFilename: 'unofficial-electron-linux.zip'
}
});
// Will download from https://mirror.example.com/electron/custom/unofficial-electron-linux.zip
const nightlyZipFilePath = await download('8.0.0-nightly.20190901', {
mirrorOptions: {
nightlyMirror: 'https://nightly.example.com/',
customDir: 'nightlies',
customFilename: 'nightly-linux.zip'
}
});
// Will download from https://nightly.example.com/nightlies/nightly-linux.zip
customDir can have the placeholder {{ version }}, which will be replaced by the version
specified (without the leading v). For example:
const zipFilePath = await download('4.0.4', {
mirrorOptions: {
mirror: 'https://mirror.example.com/electron/',
customDir: 'version-{{ version }}',
platform: 'linux',
arch: 'x64'
}
});
// Will download from https://mirror.example.com/electron/version-4.0.4/electron-v4.0.4-linux-x64.zip
Mirror options can also be specified via the following environment variables:
ELECTRON_CUSTOM_DIR - Specifies the custom directory to download from.ELECTRON_CUSTOM_FILENAME - Specifies the custom file name to download.ELECTRON_MIRROR - Specifies the URL of the server to download from if the version is not a nightly version.ELECTRON_NIGHTLY_MIRROR - Specifies the URL of the server to download from if the version is a nightly version.The version downloaded can be overriden by setting the ELECTRON_CUSTOM_VERSION environment variable.
Setting this environment variable will override the version passed in to download or downloadArtifact.
No reports for macOS yet.
GitManual AI Agent reads the 8 key files and writes a step-by-step guide for macOS. Once written, it's saved for everyone.