
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
losant-cli
Advanced tools
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 14 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 must run losant login
to authenticate with your Losant account. This command checks to see if your account is linked to a Single Sign-On (SSO) provider. If so, the command will prompt for a User Token; otherwise it will prompt for the password (and optionally your multi-factor code) for your Losant account. After either is given successfully, the command will store the authentication token on your computer. With this command, you can optionally set LOSANT_API_URL
as an environment variable; e.g. LOSANT_API_URL=<api.private.install> losant login
. By default the CLI will use https://api.losant.com
as the API URL. This will allow you to log in across Losant installations. If you are logged in to multiple Losant installations when you configure a directory, you will be asked which API token to use to access the application. From then on, any request for that application will use the same API URL.
The set-token command, losant set-token
, is an alternative way to log in for those users whose account is linked to a Single Sign-On (SSO) provider. This will take the given token, verify that token against the API, and then set it on your user configuration file. With this command, you can optionally set the LOSANT_API_URL
as an environment variable; e.g. LOSANT_API_URL=<api.private.install> losant set-token
. By default the CLI will use https://api.losant.com
as the API URL. This will allow you to set a token for any Losant private installation, and will allow you to set up multiple tokens (or use the login
command) for different Losant installations. If you do log in to multiple Losant installations, when configuring a directory for an application, the configure
command will ask which API to use to find the application. From then on, any request for that application will use the same API URL.
The 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.
The 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
The 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
The losant datatables
command is how you manage the data tables for a configured Application. It has the following subcommands:
$ losant datatables export
Chicago
$ losant datatables export Chicago
$ losant datatables export -f
Copyright (c) 2023 Losant IoT, Inc
FAQs
Losant Command Line Interface
We found that losant-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.