Command Line Interface
Riverscapes Command Line Interface (rscli)
The Riverscapes Command Line Interface (RSCLI) is a small, lightlight application for interacting with the Riverscapes Data Exchange and the associated API. RSCLI simplifies the process of uploading and downloading data from the Riverscapes Data Exchange. It handles authenticating your user account and validating data uploads.
Prerequisites
You must have node version 18 installed on your computer to use the RSCLI. You can download the latest version of node from the official website. As of the current time of writing, it must be version 18, preferably the Long Term Release (LTR).
Installing the RSCLI
Open a command line prompt (Terminal on Mac, Command Prompt on Windows) and run the following command:
npm install -g @riverscapes/cli
Using the RSCLI
The RSCLI is a command line application. To use it, open a command line prompt and run the rscli
command. The application has excellent POSEX help for all the available commands and options. To see the help, run the following command:
rscli --help
Uploading Projects
For help uploading data, run the following command:
rscli upload --help
Downloading Projects
The most common rscli use case is to download projects from the Riverscapes Data Exchange. In the following command, replace the <local_empty_folder>
with a path on your computer to an empty folder where the project will be downloaded. Replace the <project_guid>
with the GUID of a project. You can obtain this GUID from the URL when viewing the project details in the Data Exchange.
rscli download <local_empty_folder> --id <project_guid>
You must have read permissions to access the project before you can download it. A good rule of thumb is that if you can see the project details in the Data Exchange then you can download the project. Unlike downloading projects from the Data Exchange that will result in a zip file, rscli will download the project as raw individual uncompressed files.
For help downloading data, run the following command:
rscli download --help