npm install matrix-cli -g
OR
git clone https://github.com/matrix-io/matrix-cli
cd matrix-cli
npm install
# makes global `matrix` available
npm link
> matrix
_ _ ____ ___ ____ _ _ _
|\/| |__| | |__/ | \/ _ | [o]
| | | | | | \ | _/\_ |_ |_ | v1.1.1 - dev
---- SETUP ----
login - Login to the MATRIX platform
logout - Log out of the MATRIX platform
use - Indicate active device
set - set environment settings, update application configuration
↳ [env <environment>, config <app> k=v]
-- MANAGEMENT --
sim - manage local MatrixOS simulator using docker
↳ [ init, restore, start, stop, save, clear ]
list - information about your devices, applications and installations
↳ [ apps, devices, all, groups ]
reboot - Reboots the MATRIX.
----- APPS -----
search - Search for apps
install - [-a] app and [-s] sensor install. defaults to app
update - Update, update app1, update app1 v0.1
uninstall - Usage: uninstall app1
start - Starts an app running on the MATRIX.
stop - Stops an app running on the MATRIX.
restart - Restarts an app running on the MATRIX.
- DEVELOPMENT -
create - Creates a new scaffolding for a MATRIX App.
deploy - Deploys an app to the Matrix.
trigger - Runs a trigger test
log - logs output from selected MatrixOS
Register first for an account at http://admobilize.com
> matrix login
In order to issue commands, an active MatrixOS must be indicated via ID. MatrixOS can be deployed to devices or via a simulator.
Devices must first be authorized via Bluetooth or Discovery.
> matrix list devices
┌────────────────────────────────────────┬───────────────┬────┬───────────────┐
│ Device ID │ Name │ ok │ Last Online │
│ my-matrix │ main │ ok │ Today │
└────────────────────────────────────────┴───────────────┴────┴───────────────┘
Select a device ID from this list.
> matrix use my-matrix
Firstly, [https://docs.docker.com/engine/installation/](Install Docker)
docker-machine create --driver virtualbox matrix
You may wish to create a differently named virtual box if you anticipate using Docker for other images. At AdMobilize, we prefer dev
for brevity.
docker-machine create --driver virtualbox dev
docker-machine start matrix
Initialize a Matrix Simulator. This will register an instance of matrixOS with your user account and for all purposes be seen as a Device in the ecosystem.
docker pull admobilize/MatrixOSÎ
or
matrix sim upgrade
matrix init sim
Name and describe your sim. This will register the instance with our servers and return a Virtual Device Identifier. A shortcut command provided.
matrix sim start
This will drop your terminal into a Docker container.
This output can also be seen via matrix log
.
matrix use sim-deviceid15here
Configures matrix
to issue commands against this virtual device.
matrix sim start
matrix search <query>
Select an app to install
matrix install app <appname>
matrix start <appName>
matrix log
- Visit your http://dev.admobilize.com/
- Make some Appz http://api.admobilize.com/
- Be an http://developers.admobilize.com
matrix create foo
Makes a folder with a few files.
New Folder:> foo/
app.js - this is your application logic
config.yaml - change variables, indicate sensors, configure dashboard
DEVELOPER.MD - information about developing Matrix apps
index.js - app entry point, do not modify
package.json - node.js information file, do not modify without knowledge
Start with the configuration. Then Learn the API. Make some changes.
matrix deploy foo
matrix start foo
matrix log
matrix set <appName> key=value
Change the configuration of your apps on the fly, as they are running.
matrix trigger foo-event "bar"
Sends trigger to
matrix.on('event', function(data){});
Use sudo npm link
after git clone
to make matrix
available globally.
#dont gzip, not supported
tar vcf baseapp.tar baseapp