Installing Particle CLI on a Mac

The CLI is a tool that lets your computer communicate directly with the chip on your PCB. You can use it to reinstall the firmware if it becomes corrupted, or to send new WiFi credentials to the roaster.

Procedure

Step 1: Open Terminal App

Open Terminal on your Mac by doing one of the following:

  • Click the Launchpad icon in the Dock, type Terminal in the search field, then click on Terminal.

  • In the Finder, open the /Applications/Utilities folder, then double-click Terminal.

Step 2: Install CLI

Copy and paste (or type) the following line into the Terminal app:

bash <( curl -sL https://particle.io/install-cli )

If that works, you should get a message that Particle was installed to “/Users/yourname/bin/particle”. Make a note of the directory that Particle was installed to (e.g. in this case /Users/yourname/bin/particle) before closing the Terminal app.

Then to check that Particle is installed correctly, reopen Terminal and type in the following:

particle --version

You should get a message with the Particle version number (e.g. 3.38.1).

If that works, the CLI is ready to use and you can skip the rest of the guide. If you get any other kind of message, continue to the steps below to finish installation.

Step 3: Particle not found

If you get the message “command not found: particle” then we have to manually launch particle from the correct directory.

First, we need to navigate to the directory where particle was installed. To do this, type in:

cd /Users/yourname/bin/particle

but replacing the directory “/Users/yourname/bin/particle” with the actual directory that Particle was installed to in step 2.

then, to see if you can run Particle from that directory, type in the following:

./particle --version

If this works, then Particle is installed and you can go ahead and use Particle as described in other guides - except that each time you use the “particle” command, you will need to add “./” in front (for example, to start the process of adding a WiFi network you would type “./particle usb start-listening” instead. You will also need to navigate to the right directory again (with “cd /Users/…”) each time you open Terminal.

Step 4: Python

If you get a message about installing Python, follow the prompts to download and install Python. Once the installation is complete, return to step 2 to finish installation of the CLI.

Step 5. Rosetta

If you get a message that you need ‘Rosetta’, then follow the steps below

Install Rosetta

Open the Terminal app again and type:

softwareupdate --install-rosetta

Configure Terminal to use Rosetta

  • Go to the Terminal app in Finder, and right-click on it (or click while holding mac button).

  • Check the box marked ‘open with Rosetta’

  • Close any Terminal windows you have open, then relaunch the Terminal app.

  • Go back to step 2 to install the CLI.

Next
Next

Resetting all WiFi credentials