A complete tool for building modern Electron applications
Last updated a month ago by malept .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @electron-forge/cli 
SYNC missed versions from official npm registry.



Electron forge's CLI is separate from the core module, to install it you will have to use the @electron-forge/cli module from NPM.

npm i -g @electron-forge/cli

# Yarn
yarn global add @electron-forge/cli


At a high level the CLI module is just a proxy to the raw API commands. Almost all the configuration is still done in your Forge Config, the CLI just provides a handy way to trigger all the core functionality of Electron Forge (and you should definitely use it).


Please note these commands are sorted in alphabetical order, the ones you probably need to care about are start, package, make, and publish.


Maps to electronForge.import, will attempt to take an existing Electron app and make it Forge compatible. Normally this just creates a base Electron Forge config and adds the required dependencies.

There are no flags for the Import command


Maps to electronForge.init, will initialize a new Forge powered application in the given directory (defaults to .).

Please note if you want to use a template, it must be installed globally before running the init command.

Flag Value Required Description
--template Template Name No Name of the template to use to make this new app
--copy-ci-files N/A No Set if you want to copy templated CI files for Travis CI and Appveyor


Maps to electronForge.install, will attempt to install the Electron app that is published at the given GitHub repository. This command is just a helper for installing other applications quickly. E.g.

electron-forge install atom/atom


Maps to electronForge.lint, will run the lint command that your package.json exposes. If the exit code is 0 no output is shown, otherwise the error output will be displayed.

There are no flags for the Lint command


Maps to electronForge.make, will make distributables for your application based on your forge config and the parameters you pass in.

Flag Value Required Description
--arch Architecture E.g. x64 No Target architecture to make for
--platform Platform E.g. mas No Target platform to make for, please note you normally can only target platform X from platform X
--targets Comma separated list of maker names No Override your make targets for this run
--skip-package N/A No Set if you want to skip the packaging step, useful if you are running sequential makes and want to save time


Maps to electronForge.package, will package your application into a platform specific format and put the result in a folder. Please note that this does not make a distributable format, to make proper distributables please use the make command.

Flag Value Required Description
--arch Architecture E.g. x64 No Target architecture to package for. Defaults to the host arch.
--platform Platform E.g. mas No Target platform to package for. Defaults to the host platform.


Maps to electronForge.publish, will attempt to make the forge application and then publish it to the publish targets defined in your forge config.

If you want to publish previously created make artifacts you will have to use the dry-run options explained below.

Flag Value Required Description
--target Comma separated list of publisher names No Override your publish targets for this run
--dry-run N/A No Triggers a publish dry run which saves state and doesn't upload anything
--from-dry-run N/A No Attempts to publish artifacts from any dry runs saved on disk


Maps to electronForge.start, will launch the Forge powered application in the given directory (defaults to .).

If you type rs (and hit enter) in the same terminal where you ran the start command, the running app will be terminated and restarted.

Flag Value Required Description
--app-path Path to your app from CWD No Override the path to the Electron app to launch (defaults to .)
--enable-logging N/A No Enable advanced logging. This will log internal Electron things
--run-as-node N/A No Run the Electron app as a Node.JS script
--inspect-electron N/A No Triggers inspect mode on Electron to allow debugging the main process
-- extra arguments No Any additional arguments to pass to Electron or the app itself. For example: -- --my-app-argument

Current Tags

  • 6.0.0-beta.33                                ...           beta (a year ago)
  • 6.0.0-beta.51                                ...           latest (a month ago)

51 Versions

  • 6.0.0-beta.51                                ...           a month ago
  • 6.0.0-beta.50                                ...           3 months ago
  • 6.0.0-beta.49                                ...           4 months ago
  • 6.0.0-beta.48                                ...           4 months ago
  • 6.0.0-beta.47                                ...           5 months ago
  • 6.0.0-beta.46                                ...           6 months ago
  • 6.0.0-beta.45                                ...           9 months ago
  • 6.0.0-beta.44                                ...           9 months ago
  • 6.0.0-beta.43                                ...           10 months ago
  • 6.0.0-beta.42                                ...           10 months ago
  • 6.0.0-beta.41                                ...           10 months ago
  • 6.0.0-beta.40                                ...           10 months ago
  • 6.0.0-beta.39                                ...           a year ago
  • 6.0.0-beta.38                                ...           a year ago
  • 6.0.0-beta.37                                ...           a year ago
  • 6.0.0-beta.36                                ...           a year ago
  • 6.0.0-beta.35                                ...           a year ago
  • 6.0.0-beta.34                                ...           a year ago
  • 6.0.0-beta.33                                ...           a year ago
  • 6.0.0-beta.32                                ...           a year ago
  • 6.0.0-beta.31                                ...           a year ago
  • 6.0.0-beta.30                                ...           2 years ago
  • 6.0.0-beta.29                                ...           2 years ago
  • 6.0.0-beta.28                                ...           2 years ago
  • 6.0.0-beta.27                                ...           2 years ago
  • 6.0.0-beta.26                                ...           2 years ago
  • 6.0.0-beta.25                                ...           2 years ago
  • 6.0.0-beta.24                                ...           2 years ago
  • 6.0.0-beta.23                                ...           2 years ago
  • 6.0.0-beta.22                                ...           2 years ago
  • 6.0.0-beta.21                                ...           2 years ago
  • 6.0.0-beta.20                                ...           2 years ago
  • 6.0.0-beta.19                                ...           2 years ago
  • 6.0.0-beta.18                                ...           2 years ago
  • 6.0.0-beta.17                                ...           2 years ago
  • 6.0.0-beta.16                                ...           2 years ago
  • 6.0.0-beta.15                                ...           2 years ago
  • 6.0.0-beta.14                                ...           2 years ago
  • 6.0.0-beta.13                                ...           2 years ago
  • 6.0.0-beta.12                                ...           2 years ago
  • 6.0.0-beta.11                                ...           2 years ago
  • 6.0.0-beta.10                                ...           2 years ago
  • 6.0.0-beta.9                                ...           2 years ago
  • 6.0.0-beta.8                                ...           2 years ago
  • 6.0.0-beta.7                                ...           2 years ago
  • 6.0.0-beta.6                                ...           2 years ago
  • 6.0.0-beta.5                                ...           2 years ago
  • 6.0.0-beta.4                                ...           2 years ago
  • 6.0.0-beta.3                                ...           2 years ago
  • 6.0.0-beta.2                                ...           2 years ago
  • 6.0.0-beta.1                                ...           2 years ago
Today 3
This Week 57
This Month 559
Last Day 26
Last Week 189
Last Month 1,096
Dependencies (10)
Dev Dependencies (4)

Copyright 2014 - 2017 © taobao.org |