Datalayer CLI
Datalayer provides a Command Line Interface (CLI) that supports the platform features.
Check you have python>=3.9
and pip
and install Datalayer with the following command in your terminal.
pip install datalayer
If you have already installed datalayer
, upgrade with the following command.
pip install datalayer --upgrade
Once installed you can invoke the datalayer
command.
datalayer
Datalayer - Version 1.0.0 - Connected as None on https://prod1.datalayer.run
[DatalayerCLI] One of `about` `benchmarks` `envs` `runtimes` `login` `logout` `web` `who` `whoami` must be specified.
Ask details adding --help
to any of the commands.
datalayer --help
The Datalayer CLI application.
Subcommands
===========
Subcommands are launched as `datalayer_core cmd [args]`. For information on
using subcommand 'cmd', do: `datalayer_core cmd -h`.
about
benchmarks
envs
runtimes
login
logout
...
You can use dla
or even d
as shortcut, instead of datalayer
if you prefer.
The about
command is available to explain you the features
datalayer about
Datalayer - Version 1.0.0 - Connected as None on https://prod1.datalayer.run
About
Datalayer provides a command line tool allowing to list,
create, terminate and open a console against with Runtimes.
Read more on https://datalayer.io
All command lines support an option --run-url
to set the URL of the Datalayer RUN cluster providing the Datalayer services.
datalayer runtimes list --run-url https://prod1.datalayer.run
Alternatively, you can set environment variables to avoid adding parameters to every command.
export DATALAYER_RUN_URL="https://prod1.datalayer.run"
export DATALAYER_TOKEN="MY_TOKEN"
export DATALAYER_EXTERNAL_TOKEN="MY_EXTERNAL_TOKEN"
datalayer whoami
datalayer envs list
datalayer runtimes list
We also made it easy for you to get the values via a User Interface (on SaaS, JupyterLab...). Go to the action menu of the Kernel list and select the Copy terminal command line
action. This will copy in your clipboard the command to run from CLI with the needed environment variables.