Skip to content
An easy-to-use CLI for handling ESP8266 images: erase, download and flash with ease
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A CLI to handle images for the ESP8266

Flash an ESP8266 in no time (nodemcu & arduino)


In building, a company developing and selling products based on ESP8266s, a large problem we encountered was
How do you flash a large number of chips with little effort in a short amount time?

To solve this, I created autoflash, of which I am now publishing the third generation.

You can wipe a chip clean, create backups and upload them again.
Uploading to a 4MB chip takes a mere 15s.
Autoflash automatically selects the port depending on the OS.


Autoflash uses npm as a means of distribution.

$ npm i -g autoflash


Autoflash works with binary files. The only reason we use the file extension .afl is so that we know that they are ESP8266 images, but it can also be omitted.

Adding the flag -v or --verbose tells autoflash to display everything it does in detail.

Available commands:
device / devices


$ autoflash download [] [--port=<auto>]
  • If no filename is specified, the file is downloaded to the current working directory with the name "".

  • If no port is specified, autoflash decides which port to use


$ autoflash upload [--port=<auto>]
  • If no port is specified, autoflash decides which port to use


$ autoflash erase [--port=<auto>]
  • If no port is specified, autoflash decides which port to use

Port selection

For the above commands, a port can be specified using the optional --port flag. If no port is specified, autoflash detects an active port and uses it.

The port automatically selected port can be viewed with

$ autoflash device

To get a list of available ports, use

$ autoflash devices


If you want to contribute but don't know where to start, these are a few things that would be cool to have:

  • Complain when specified port doesn't exist
  • Complain on error with
  • JS API so that it can be integrated as a dependency in other programs
  • Progress bar
    • Download
    • Upload
    • Erase


Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


GNU General Public License v2.0

You can’t perform that action at this time.