Basic usage
Categories:
Prior reading: Overview of the Command Line Interface
Purpose: This document provides summary examples of commands that may be used alone or in combination to perform typical operations using the Workbench CLI.
Prerequisites
These instructions assume that you have already installed the Workbench CLI or are working in a cloud environment where it has been installed.
Starting a new work session
This is an example of the typical flow of operations when starting a new work session with the Workbench CLI.
Log in
Use this command to authorize the Workbench CLI to access the relevant APIs and data with user credentials.
terra auth login
Optionally, check the authentication status to confirm the login was successful.
terra auth status
Check server status
Use this command to check the status of the server and details of the current context.
terra server status
List accessible workspaces
This command lists all workspaces that you (i.e. the logged-in user) have read or write access to.
terra workspace list
Create a new workspace
Use this command to create a workspace as well as a Google project to back the workspace.
Note: Make sure to replace <my-workspace-id>
and <my-workspace-name>
with the desired ID and name (without brackets).
terra workspace create --id=<my-workspace-id> --name=<my-workspace-name>
The --name=<my-workspace-name>
argument is optional; if you do not include it, the system will assign a randomly generated unique identifier (UUID).
Optionally, you can use the terra status
command to confirm that the workspace was created successfully.
terra status
ℹ️ terra status
Use an existing workspace
If you want to use an existing workspace, use the set
command instead of create
.
terra workspace set --id=<my-workspace-id>
Note that in the Verily Workbench web UI, the overview page of a workspace includes a predetermined command that can be copied and pasted to set that workspace in the CLI.
Set gcloud credentials
Use this command to set user and application default credentials that the gcloud utilities should use to access data.
gcloud auth login
gcloud auth application-default login
ℹ️ gcloud auth
Last Modified: 16 November 2023