A docker friendly version of our CLI.
10K+

The Command Line Interface tool to interact with the Barracks API
Node.js >= 6.x
$ npm install -g barracks-cli
At any moment, if you want to know what you can do with the CLI or if you need any help about a specific command, you can use the help command:
$ barracks help
Usage: barracks [options] [command]
Commands:
login Authenticate to Barracks
account Get account information
update [cmd] Manage updates
device [cmd] Manage devices
segment [cmd] Manage segments
token [cmd] Manage tokens
check-update Check for an update the same way a device would
help [cmd] display help for [cmd]
Options:
-h, --help output usage information
-V, --version output the version number
You need to login to Barracks before using any other command:
$ barracks login
email: [email protected]
password:
Authentication successful
Enable the V2 flag to access new features of Barracks. To do so, just enable the V2 flag :
$ export BARRACKS_ENABLE_V2=1
Now, you have access to all V2 features
$ barracks help
Usage: barracks [options] [command]
Commands:
login Authenticate to Barracks
account Get account information
device [cmd] Manage devices
filter [cmd] Manage filters
package [cmd] Manage packages
token [cmd] Manage tokens
help [cmd] display help for [cmd]
Options:
-h, --help output usage information
-V, --version output the version number
Currently, the following features are available through the CLI:
Create a new update
$ barracks update create --title "My Update" --segment Other --versionId v0.0.14 --package /home/barracks/packages/0.0.14/update.zip
Get event history of a device
$ barracks device get "unit_qwerty1234"
Emulate a device checking for an update
barracks check-update --unitId EmulatedDeviceId --versionId "0.1"
barracks check-update --unitId EmulatedDeviceId --versionId "0.1" --customClientData '{ "key1":"value1", "key2":"value2" }'
barracks check-update --unitId EmulatedDeviceId --versionId "0.1" --customClientData '{ "key1":"value1", "key2":"value2" }' --download ~/Downloads/update.sh
Get event history of a device
$ barracks device get "unit_qwerty1234"
Create a filter
$ barracks filter create --name "exampleFilter" --query '{ "regex": { "unitId": ".*qwerty.*" } }'
Get all devices matching a filter
$ barracks device ls --filter "exampleFilter"
Create a package
$ barracks package create --reference io.barracks.app1 --name "Barracks Appli 1"
Create a version for a package
$ barracks package version create --versionId v1 --name "App 1 - Version 1" --packageReference io.barracks.app1 --file ~/versions/app1_v1_.sh
Publish a deployment plan for a package
$ barracks package plan publish --file ~/ressources/app1_plan.json
$ cat ~/ressources/app1_plan.json | barracks package plan publish
Content type
Image
Digest
Size
32.3 MB
Last updated
about 9 years ago
docker pull barracksiot/cli:unstable