Skip to main content

Installation

info

RemotiveCLI is still experimental - meaning that it is fully functional bugs might exists and changes between versions might occur.

You can install the CLI with pipx/pip or use a dockerized version.

info

You will need at least python 3.10

pipx is the recommended way to install remotivelabs-cli

pipx

Pipx installs remotivelabs-cli in a separate virtualenv which is recommended.

pipx install remotivelabs-cli
pipx upgrade remotivelabs-cli

pip

pip install -U remotivelabs-cli

Verify installation

Regardless of the installation choice you made, you should be able to run this command and get this output.

remotive --version
remotivelabs-cli 0.0.1rc{N}
$ remotive --help

Usage: remotive [OPTIONS] COMMAND [ARGS]...

Welcome to RemotiveLabs CLI - Simplify and automate tasks for cloud
resources and brokers

╭─ Options ────────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to │
│ copy it or customize the installation. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────╮
│ broker Manage a single broker - local or cloud │
│ cloud Manage resources in RemotiveCloud │
│ tui Explore remotive-cli and generate commands with this │
│ textual user interface application │
╰──────────────────────────────────────────────────────────────────────────╯

Cloud setup

This part covers how to use the cli to operate with cloud resources at https://cloud.remotivelabs.com.

Login

info

This will not work if you are running the cli with docker, please read the installation instructions for docker

When signing in, a web-browser will be opened to let you sign-in with your credentials. Once you have signed in with the browser you are good to go.

$ remotive cloud auth login
Successfully logged on, you are ready to go with cli

Verify credentials

  1. Verify that you are who you think you are
$ remotive cloud auth whoami | jq .
{
"firstName": "John",
"lastName": "Dev",
"email": "john.dev@remotivelabs.com",
"picture": "https://lh3.googleusercontent.com/a/asdf=s96-c",
"uid": "xxx"
}
  1. Get your organisation and projects

First you need the uid of the organisation that you want to work with, you can get your organisations with the following command

$ remotive cloud organisations
["my-organisation", "another-organisation"]

In order to to anything useful you need to project your are working with, use this command to list available projects.

$ remotive cloud projects list --organisation my-organisation
["my-personal-project", "customer-project"]

How to use cli with cloud

Under RemotiveCloud section of the documentation we cover how to work with our cloud both with Cloud console and CLI - for each feature!

How-to use default values

When you are working with the cli, some common option parameters must be set and having to always set these can be tedious. We provide three options that can be overridden with default values as environment variables

Organisation

Some commands require the --organisation command but its not that common, on the other hand this is likely not to change so often.

REMOTIVE_CLOUD_ORGANISATION=my-organisation

Project

When working with cloud resources such as recordings or brokers all reside within a project. Instead of always supplying --project option you can set environment variable to the project your are currently working on

REMOTIVE_CLOUD_PROJECT=my-project

Recording session

When working with recordings it can help you to not always having to supply the --recording-session

REMOTIVE_CLOUD_RECORDING_SESSION=my-recording-session

Broker url and api-key

Instead of --url you can set (REMOTIVE_BROKER_URL=http://localhost:50051) and instead of --api-key use can use (REMOTIVE_BROKER_API_KEY=xxx-xxx-xxx-xxx)

Help

All cli groups and commands support --help option so you can always ask for more help.

Example

remotive cloud recordings list --help
 Usage: remotive cloud recordings list [OPTIONS] [TYPE]

Lists recordings in project

╭─ Arguments ──────────────────────────────────────────────────────────────╮
│ type [TYPE] all, processing, recent [default: all] │
╰──────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────╮
│ * --project TEXT Project ID │
│ [env var: REMOTIVE_CLOUD_PROJECT] │
│ [default: None] │
│ [required] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────╯