particle-iot/particle-cli-wrapper

Name: particle-cli-wrapper

Owner: Particle

Description: Auto-updating wrapper for the Particle CLI

Created: 2016-05-13 15:20:31.0

Updated: 2016-11-17 16:46:22.0

Pushed: 2018-05-03 21:56:26.0

Homepage: https://www.particle.io/cli

Size: 5758

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Particle CLI Wrapper

This tools is a wrapper around the Particle CLI that manages the version of Node.js used and auto-updates the Javascript modules.

Install through the Particle website

If you already have the CLI installed, uninstall it with npm uninstall -g particle-cli

Overview

The Particle CLI Wrapper is a delicacy consisting of a light Go shell filled with a sweet creamy Node.js core.

The Go shell manages its own Node.js installation. It is able to update itself, Node and Node modules. It forwards commands to the main Node.js CLI module. Since it is compiled natively for each platform it is easy to install.

The Node.js core is today's production Particle CLI. It performs all interactions with the Particle cloud.

Architecture

The version of Node.js to be installed to run the CLI is selected in set-node-version. When this script is run, the installation files for Node.js and npm for Mac OSX, Windows and Linux are downloaded from then uploaded to

The CLI wrapper is compiled for Mac OSX, Windows and Linux with rake build and uploaded to with rake release

A manifest file is also uploaded at https://binaries.particle.io/cli/master/manifest.json with the latest version of the CLI wrapper for each platform and the Node.js version that should be installed.

When the CLI wrapper is run, it will download the manifest file. It will check if there's a new version of itself and download it. If the managed version of Node.js is missing or there is a new one, it will download and install Node.js. If the main Node.js module particle-cli is missing or there's a new version on npm, it will download and install it.

The managed version of Node.js, the modules and the CLI wrapper executable are stored in ~/.particle or C:\Users\name\AppData\Local\particle

Installer

See the installer directory for the source code of the Mac OSX, Windows and Linux installers that downloads the latest CLI wrapper and runs it once to make Node.js install.

Development
License

Copyright 2016 © Particle Industries, Inc. Licensed under the Apache 2 license.

Based on the Heroku CLI


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.