Losant CLI is a command line tool to help manage your Losant Application and its resources. It easily lets you manage Experience Views, Experience Versions, Files, and Data Tables in your Applications.
The CLI requires Node.js version 8.3 or higher. The latest stable version is available in NPM and can be installed using:
npm install -g losant-cli
losant [options] [command]
Before you run any other commands, you will want to run
losant login to authenticate with your Losant account.
This will ask for the email address and password (and optionally your 2 factor code) for your Losant account, and store
an authentication token on your computer.
losant configure command configures and links the current directory to one of your Losant Applications. Once you have configured you will notice a few new directories into your current directory. There will be the following directories added:
This is how the CLI will be able to detect new files, experience views, or data tables that you want to add, update or remove from your Losant Application. The files directory will contain and reflect the directory and files on your Losant Application's Files. Similarly, the dataTables directory will contain your Losant Application's data tables as csv files. and The experience directory is broken down by view type (components, layouts and pages), e.g. if you want to create a new component add this to your components directory, or if you want to remove a page, you will find that page located under experience/pages.
losant experience command is how you manage the Experience Views and Versions for a configured Application. It has the following subcommands:
$ losant experience download
$ losant experience download --type components
$ losant experience download --type components error*
$ losant experience download -f
$ losant experience status
$ losant experience upload
$ losant experience upload --type components /*
$ losant experience version
$ losant experience version -l v1.*
$ losant experience version v1.0.0
$ losant experience version v1.0.1 -d "updated home page"
$ losant experience watch
$ losant experience layout
$ losant experience layout -l v1.*
$ losant experience layout
$ losant experience bootstrap
losant files command is how you manage the files for a configured Application. It has the following subcommands:
$ losant files download
$ losant files download images/*
$ losant files download -f
$ losant files status
$ losant files upload
$ losant files upload images/*
$ losant files upload -f
$ losant files watch
losant datatables command is how you manage the data tables for a configured Application. It has the following subcommands:
$ losant datatables export
$ losant datatables export Chicago
$ losant datatables export -f
Copyright (c) 2019 Losant IoT, Inc