Particle's full-stack Internet of Things (IoT) device platform gives you everything you need to securely and reliably connect your IoT devices to the web. For more details please visit www.particle.io.
The Particle CLI is a powerful tool for interacting with your IoT devices and the Particle Cloud. The CLI uses node.js and can run on Windows, Mac OS X, and Linux. It's also open source so you can edit and change it, and even send in your changes as pull requests if you want to share!
- The Wireless Photon Setup Wizard will only automatically switch networks on OS X. Users of other operating systems will need to manually connect their computer to the Photon's Wi-Fi. You will be prompted during the wizard when this is required.
For the most up-to-date installation instructions, including Windows installer, see CLI - Installation on our documentation site.
To make sure you are running the latest version of particle-cli, type the following command:
npm update -g particle-cli
Running from source (advanced)
To grab the CLI source and play with it locally
git clone email@example.com:particle-iot/particle-cli.git cd particle-cli npm install node bin/particle help
Table of Contents
- Getting Started
- Updating Firmware
- Command Reference
These next two commands are all you need to get started setting up an account, claiming a device, and discovering new features.
Guides you through creating a new account, and claiming your device!
$ particle setup
Shows you what commands are available, and how to use them. You can also give the name of a command for detailed help.
$ particle help $ particle help keys
If you wish to easily update the system firmware running on your device to a later version, you can use the
particle update command. For the exact version it will update to, check the version of the files in the updates folder.
- Make sure you have DFU-util installed.
- Connect your device via USB, and put it into DFU mode.
For the full list of commands, please see the CLI command reference.
Clone the repository and run
To ensure compatibility with versions of Node 4 and later, the code in
src is transpiled using Babel and output to
dist. This means you
npm run compile to have changes in
src be taken into account.
To run in development mode using the files from
src directly, run
Updating system firmware
npm run update-firmware-binaries <version>where
<version>is the newly released system firmware version like 0.7.0
If a particular device requires
requiresBootloaderAscenderApp: truefound in
src/lib/deviceSpecs/specifications.jsthen a manual step is required that replaces the firmware files copied from the above step with the special system firmware required that allows the bootloader to be updated by the ascender.bin user app. There will be a draft release in the
particle-iot/firmwarerepo containing these files.
Test on each platform by doing
# Check old firmware version bin/particle.js serial inspect # Flash new system firmware bin/particle.js update # Verify new firmware version bin/particle.js serial inspect
Do not update the versions or CHANGELOG.md just yet!
Commit as something like "adds firmware binaries for 0.7.0" and preceed to release a new CLI version (below).
Releasing a new version