Download:
Usage: oak [-d device_name] [filename]
oak [filename] Uploads the bin file at [filename] to the Oak via the Particle Cloud using the credentials and device currently selected. Quits with error is no credentials previously provided or access token has expired.
oak [-d device_name] [filename] Uploads the bin file at [filename] to the Oak with device_name via the Particle Cloud using the current credentials. Quits with error is no credentials previously provided or access token has expired.
oak If not yet logged in, or access token has expired - accepts credentials for Particle Cloud, fetches access token, then presents a list of devices on your account to choose from. If it already has a valid access token it will go straight to the list. Selecting a device saves the selected device id and access_token to the config file, so any initiated uploads will go to that device. Remains in device selection loop so you can quickly change devices, exit, or change accounts.
If using Ubuntu 12.04 or earlier, or similar - node requires g++4.8 or higher
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-4.8 g++-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
After those steps or if using 14.04 or similar or higher
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential
sudo npm install -g nexe
git clone https://github.com/digistump/OakCLI
cd OakCLI
npm install
nexe -r 0.12.10 -i ./oak.js -o ./oak
- Install homebrew
brew install node
npm install -g nexe
git clone https://github.com/digistump/OakCLI
cd OakCLI
npm install
nexe -r 0.12.10 -i ./oak.js -o ./oak
- Install node.js (http://nodejs.org)
- Install python 2.7 (https://www.python.org/ftp/python/2.7.11/python-2.7.11.msi)
- Install Visual C++ Build Tools (https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx, download community edition, install C++ Command Line Build Tools and C++, no need to register it)
- Install git (or download zip of this repository and unzip)
npm install -g nexe
git clone https://github.com/digistump/OakCLI
cd OakCLI
npm install
nexe -r 0.12.10 -i ./oak.js -o ./oak.exe