2.0.50 • Published 7 months ago

@riverscapes/cli v2.0.50

Weekly downloads
120
License
ISC
Repository
-
Last release
7 months ago

Riverscapes CLI (JavaScript)

Overview

This repository contains the Riverscapes CLI, a command-line tool designed to programmatically manage river restoration projects. It provides functionality to upload and download projects from the Riverscapes Data Exchange, validate project files, and interact with the Data Exchange API. The CLI supports detailed logging, user authentication, and flexible options for managing project data.


Installation

To install the Riverscapes CLI globally on your system, use the following command:

npm install -g @riverscapes/cli

Ensure you are using the correct node version in the cli. In rs-web-monorepo/packages/cli, run

nvm use 

Environment Configuration

Before using the CLI, you need to configure the environment to correctly point API calls to the staging site. Create a file named .env.cli.staging in the root of your repository and add the following line:

RS_API_URL=https://api.warehouse.riverscapes.net/staging

This ensures that the CLI interacts with the staging environment of the Riverscapes Data Exchange.


Usage

The Riverscapes CLI provides a variety of commands for downloading and uploading projects. Below are examples of common use cases:

Developer Note

For detailed logs and debugging information, use the --verbose flag with any command. This will provide more insights into the CLI's operations and help troubleshoot issues effectively.

Downloading Projects

You can download projects from the Riverscapes Data Exchange using different filters such as project ID, type, metadata, tags, or search terms.

Download by Project ID

rscli download ./junk --id "NationalDatasets" --verbose

Download by Project Type

rscli download ./junk --type "NationalDatasets" --verbose
rscli download ./junk --type "RSContext" --verbose

Download by Search Term

rscli download ./junk --search " " --verbose
rscli download ./junk --search "17020016" --verbose

Download by Metadata

rscli download ./junk --meta "huc8=17020016" --verbose

Download by Tags

rscli download ./junk --tags "cybercastor" --verbose
rscli download . --tags "cybercastor" --verbose

Uploading Projects

After making edits to a project locally, you can upload your changes back to the Riverscapes Data Exchange using the CLI. The upload functionality ensures that your updates are instantly visible on the platform, enabling real-time collaboration.

Example Upload Command

rscli upload ./path-to-project --verbose

2.0.48

7 months ago

2.0.49

7 months ago

2.0.46

10 months ago

2.0.47

9 months ago

2.0.44

1 year ago

2.0.45

10 months ago

2.0.42

1 year ago

2.0.43

1 year ago

2.0.50

7 months ago

2.0.39

1 year ago

2.0.40

1 year ago

2.0.41

1 year ago

2.0.38

1 year ago

2.0.37

1 year ago

2.0.36

2 years ago

2.0.35

2 years ago

2.0.33

2 years ago

2.0.34

2 years ago

2.0.32

2 years ago

2.0.28

2 years ago

2.0.29

2 years ago

2.0.31

2 years ago

2.0.30

2 years ago

2.0.27

2 years ago

2.0.26

3 years ago

2.0.24

3 years ago

2.0.25

3 years ago

2.0.23

3 years ago

2.0.3

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.15

3 years ago

2.0.16

3 years ago

2.0.13

3 years ago

2.0.14

3 years ago

2.0.11

3 years ago

2.0.12

3 years ago

2.0.10

3 years ago

2.0.19

3 years ago

2.0.17

3 years ago

2.0.22

3 years ago

2.0.20

3 years ago

2.0.21

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

0.0.42

6 years ago

0.0.40

6 years ago

0.0.41

6 years ago

0.0.39

6 years ago

0.0.38

6 years ago

0.0.37

6 years ago

0.0.36

6 years ago

0.0.34

6 years ago

0.0.35

6 years ago

0.0.32

6 years ago

0.0.33

6 years ago

0.0.31

6 years ago

0.0.30

6 years ago

0.0.27

6 years ago

0.0.28

6 years ago

0.0.29

6 years ago

0.0.26

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago