npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

particle-cli

v3.22.0

Published

Simple Node commandline application for working with your Particle devices and using the Particle Cloud

Downloads

2,138

Readme

npm Build Status License

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.

Particle CLI

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!

Table of Contents

Installing

For end-users, the most up-to-date installation instructions can be found here: macOS / Linux | Windows

Note: On some platforms (e.g. arm), additional manual steps are required:

particle-cli uses npm packages node-usb and node-serialport. On some environments (ie: Raspberry Pi and Apple M1), node-serialport does not provide prebuild environments, so their npm install script relies on creating a prebuild using node-gyp (See node-gyp requirements), and libudev (See node-usb installation. And these must be installed in order for their npm install script to succeed. As well, particle-cli uses openssl.

As an example, to install these dependencies on Raspbian/Debian/Ubuntu:

sudo apt update && sudo apt upgrade
sudo apt install build-essential libudev-dev python3 openssl

Getting Started

These next two commands are all you need to get started setting up an account, claiming a device, and discovering new features.

particle setup

Guides you through creating a new account, and claiming your device!

$ particle setup

particle help

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

particle update

If you wish to easily update Device OS on your device to a later version, you can use the particle update command. You can specify a version with the --target argument.

  1. Connect your device via USB
  2. Run particle update.

Command Reference

For the full list of commands, please see the CLI command reference.

Known Issues

  • 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.

Development

Currently development is supported on macOS only!

Installing

  1. Install Node.js [[email protected] and [email protected] are required]
  2. Clone this repository $ git clone [email protected]:particle-iot/particle-cli.git && cd ./particle-cli
  3. Install external tools: openssl (e.g. brew install openssl)
  4. Install dependencies $ npm install
  5. View available commands $ npm run
  6. Run the tests $ npm test
  7. Run the CLI $ npm start
  8. Start Hacking!

Running

When developing, run individual commands using:

$ npm start -- <command> <options> - e.g. $ npm start -- library view dotstar --readme

Anything after the -- delimiter is passed directly to the CLI (docs).

To test the source as it will be published:

  1. Register the particle command globally: $ npm link
  2. Run commands: $ particle --help (using standard argument formatting)

Testing

The Particle CLI has a number of automated test suites and related commands. The most important are:

  • npm test - run all tests (NOTE: End-To-End tests require additional setup)
  • npm run lint - run the linter and print any errors to your terminal
  • npm run test:ci - run all tests excluding device-dependent end-to-end test as CI does
  • npm run test:unit - run unit tests
  • npm run test:integration - run integration tests
  • npm run coverage - report code coverage stats

All tests use mocha, chai, and sinon with coverage handled by nyc.

We recommend running locally if you can as it greatly shortens your feedback loop. However, CI also runs against every PR and error reporting is publicly available.

Releasing a new version

See RELEASE.md.