Coder Social home page Coder Social logo

jinyangqiao / particle-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from particle-iot/particle-cli

0.0 2.0 0.0 7.87 MB

Command Line Interface for Particle Cloud and devices

License: Apache License 2.0

Shell 0.19% Ruby 1.59% JavaScript 84.15% Gherkin 6.38% C++ 7.31% C 0.08% Makefile 0.18% HTML 0.11%

particle-cli's Introduction

npmBuild StatusCode CoverageLicense

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!

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.

Installing

For the most up-to-date installation instructions, including Windows installer, see CLI - Installation on our documentation site.

Updating

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 protected]:particle-iot/particle-cli.git
cd particle-cli
npm install
node bin/particle help

Table of Contents

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

Updating Firmware

Photon/P1/Electron

particle update

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.

  1. Make sure you have DFU-util installed.
  2. Connect your device via USB, and put it into DFU mode.
  3. Run particle update.

Command Reference

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

Development

Clone the repository and run npm install.

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 must run npm run compile to have changes in src be taken into account.

To run in development mode using the files from src directly, run

PARTICLE_CLI_DEVELOPMENT=1 bin/particle.js

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: true found in src/lib/deviceSpecs/specifications.js then 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/firmware repo 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

See RELEASE.md.

particle-cli's People

Contributors

monkbroc avatar brycekahle avatar m-mcgowan avatar kennethlimcp avatar dmiddlecamp avatar busticated avatar suda avatar kylemarsh avatar technobly avatar derekmpeterson avatar rwaldron avatar towynlin avatar joegoggins avatar harrisonhjones avatar wgbartley avatar mebrunet avatar endorama avatar avtolstoy avatar hypnopompia avatar objectivesee avatar yutingyou avatar vk2tds avatar optikfluffel avatar beroe avatar zsup avatar nfriedly avatar markterrill avatar katiek2 avatar naikrovek avatar jme783 avatar

Watchers

James Cloos avatar qiaojinyang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.