Setting up Rescale CLI
A command-line app for submitting jobs to Rescale
The Rescale Client App or Rescale Command Line Interface (CLI) is a Java-based client application for submitting and managing jobs to Rescale without having to explicitly know the Rescale API. Aside from providing a simple command line utility for the Rescale API, it also integrates the multi-threaded transfer library for uploading files directly to the Rescale Cloud Storage. This also handles any authentication related to uploading/downloading files from the Rescale Data Store. The App has several main functions:
- Submit: submitting a job in the current working directory to Rescale
- Status: obtaining the status of a running job on Rescale
- Sync: syncing output files of jobs to your hard drive
- Retrieve Info: retrieve metadata from the Rescale API
This section describes the steps needed to set up the Rescale CLI App on your local workstation. You will need to set up your API Key settings and install Java to download and use the Rescale CLI App.
Obtaining an API Key Token
In order to utilize the Rescale CLI App, an API key token must be generated to properly identify the user and associated account.
To create this API token, in the Rescale Web UI, click on the drop down menu associated with the user account name (usually your email address) in the upper right hand corner. Select Account from the drop down menu. Then from the navigation menu on the left choose API. This should bring you to: https://platform.rescale.com/user/settings/api-key/
From this page, click the Generate button to create a new API key. Make note of this string, but you can return to the page at anytime to retrieve it. This string is your private
Getting the Rescale CLI App
Currently, the Rescale CLI Java-based app is not supported on Java version 9 or 10. You can download Java 8 from the following link
On the Rescale API page, below your API token, the Rescale CLI Java-based app can also be downloaded.
Please move the downloaded file (
rescale.jar) from the 'Downloads' folder into a directory in your path. For Linux and Mac OS X systems, we recommend putting the file in the
/usr/local/bin/ directory. Also, make sure this directory is included in your
$PATH environment variable. Otherwise when invoking CLI commands ensure that the full path to this file is specified.
Verifying the installation of Rescale CLI
Open your terminal (on MacOS/Linux) or command prompt (on Windows), and paste the command below:
The resulting command should reflect as shown in the image below: