Skip to content

A command line tool to list, create, and delete Portals

License

Notifications You must be signed in to change notification settings

massive-io/masv-portal-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# masv_portal

Español

Name

masv_portal -- A command line tool to list, create, and delete MASV Portals.

Table of contents

Synopsis

masv_portal ls [ --team team-ID ] [IDs or subdomains ...]

masv_portal new --subdomain string --name string --message string --recipients email [...] [ --access_code string ] [ --download_password string ] [ --tag string ]

masv_portal rm ID [...]

Requirements

To use this tool, you'll need these:

  • Node.js, version 18.19.0 or later
  • npm, version 9.2.0 or later

Setting up

Before using masv_portal, configure your MASV credentials. You can do this with environment variables or a .env file in the same directory as the masv_portal tool. See Environment and Files.

Description

The masv_portal tool lists, creates, and deletes MASV Portals. It gives you a way to automate your file transfer workflow.

And it's open source and extensible so you can add other commands, options, and improvements.

Global options

These options are available for all commands:

-v, --verbose

Output diagnostic information to standard error.

-V, --version

Output the version of this tool.

-h, --help

Output usage information. You can also use this option with each command.

masv_portal ls

List Portals in your team. For each matching Portal ID or subdomain, show the Portal's ID, date of creation, tag, and subdomain. With no IDs or subdomains, list all Portals in a team.

-t ID, --team ID

Optional. Overrides the team ID specified by MASV_TEAM. The API key that you use must give you access to this team.

masv_portal new

Create one or more new Portals.

--subdomain string

Required. The subdomain be unique among all subdomains in MASV, not just your Team.

--name string

Required. A human-friendly name for the Portal.

--message string

Required. A human-friendly, short description of the Portal.

--recipients email [...]

Required. A list of one or more email addresses.

-t ID, --team ID

Optional. Overrides the team ID specified by MASV_TEAM. The API key that you use must give you access to this team.

--access_code string

Optional. Password to access the Portal page.

--download_password string

Optional. Password for downloading packages from this Portal.

--tag string

Optional. Name of the tag to associate with packages that are uploaded to this Portal. If the tag doesn't exist for this Team, MASV will create it.

masv_portal rm

Deletes Portals with matching IDs.

Warning: This cannot be undone.

Environment

If the following variables aren't set in the environment, then the tool uses their definitions in the .env file.

MASV_API_KEY

An API key that you've created.

MASV_TEAM

The default Team to use. The MASV user associated with the API must be a member of this team. The -t option overrides this variable.

Files

.env

An environment file in the same directory as this tool. It defines the environment variables that this tool uses.

An example .env file:

MASV_API_KEY=EXAMPLEKEY123
MASV_TEAM=EXAMPLETEAMID321

Exit status

0

Success.

1

An error occurred. The tool also outputs an error message to standard error.

Examples

List all Portals:

masv_portal ls

Create a Portal named "My New Portal" with the subdomain "mynewportal" and [email protected] as the recipient. Use the Portal's tag to record a job number, JOB-2024-03:

masv_portal new \
--name "My New Portal" \
--message "Welcome to my new Portal!" \
--subdomain mynewportal \
--recipients "[email protected]" \
--tag "JOB-2024-03"

Delete a Portal:

masv_portal rm E1XSATMHPWLSESDJFQHGW4HKHJ

Delete Portals with tag JOB-2024-03:

masv_portal rm $(node . ls | awk '$3=="\"JOB-2024-03\"" { print $1 }')

Getting help

Some useful links to learn more about working with MASV Portals:


Made with ♥ in Canada

About

A command line tool to list, create, and delete Portals

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published