toc

Evervault CLI

Manage Evervault from your terminal.

Installation

The latest version of the Evervault CLI can be downloaded and automatically installed using the following command:

bash
sh <(curl https://cli.evervault.com/install -sL)

Globally Available Flags

There are some globally available flags which can be used with almost any command within the Evervault CLI.

  • --json: Any output from the CLI should be JSON formatted
  • --no-color: Disable coloured output. Note: the CLI will also respect the NO_COLOR and EV_NO_COLOR environment variables to disable colour.
  • --help: Print the helper text for any command

Commands

The Evervault CLI supports commands related to:

  1. Authentication →
  2. Cages →
  3. Relay →
  4. Teams →
  5. Support →
  6. Misc. →

Authentication

Use these commands to login and logout of the Evervault CLI.

Login

Log in to the Evervault CLI to get started:

bash
ev login
  • The CLI must be able to launch a browser to log you in.

Logout

Log out from the Evervault CLI:

bash
ev logout

Cages

Use the following commands to manage your Cages.

cage deploy

Deploy a Cage using the source code of your current directory:

bash
ev cage deploy [Flags]
  • Your current directory needs to contain a package.json and an index.js with an exported handler function.
  • Your Cage will use the name from the directory’s package.json.
  • By default, the CLI will wait for the Cage deployment to complete. If you only want to begin the deployment, you can use the --background flag.
  • If you want to deploy your Cage in a CI pipeline, you can set the EV_API_KEY environment variable to your team's API key, and pass the --api-key-auth flag.

Flags

  • --background - don’t wait for the Cage to complete its deployment.
  • --quiet - only print essential logs.
  • --api-key-auth - authenticate the deployment using the EV_API_KEY environment variable

cage clone

Clone an existing Cage in your current directory.

bash
ev cage clone [Flags] [Options] --name <cage_name>
  • If something already exists at the directory, you will have to confirm that you wish to overwrite it. This confirmation can be prevented using the --force flag.

Options

  • --name <cage_name> - the name of the Cage from your current Team to clone.
  • --dir <directory> - specify a directory to clone the Cage into.

Flags

  • --force - force the cage clone to continue without prompting (note: this will overwrite existing directories).

cage delete

Delete a Cage:

bash
ev cage delete [Flags] [Options]

Options

  • --name - the name of the Cage to delete. To use your current directory to specify the Cage, you must pass the --use-current-dir flag.

Flags

  • --force - force the cage to be deleted without a confirmation dialogue.
  • --use-current-dir - use the package.json in the current directory to identify the Cage to delete.

cage edit

Edit a Cage:

bash
ev cage edit [Flags] [Options] --name <new_cage_name>
  • The name field of the package.json in the current directory will be updated to reflect the new Cage name. Before updating the package.json, you will be asked to confirm the update. You can use the --force flag to prevent the confirmation.

Options

  • --name - the new name for the Cage.

Flags

  • --force - force the package.json name field to be updated without prompting.

cage env

Interact with the environment variables of the Cage in the current directory:

bash
ev cage env (get|set|delete) [Flags] [Options]

Options

  • --name <cage_name> - the name of the Cage to interact with. If not given, the CLI will look for a package.json in the current directory.
  • --key <env_key> - the environment variable key to get, set or delete.
  • --value <env_val> - the value to set for the environment variable.

cage init

Initialize a simple “hello world” Cage either in your current directory, or the directory provided:

bash
ev [cage] init [Flags] [Options]

Options

  • --name <cage_name> - the name of the Cage to create. If not given, the cage will be created with the name hello-cage.
  • --dir <directory> - the directory to create the Cage in. If not given, the Cage will be created in a subdirectory of the current directory using the name of the Cage.

cage list

List all of the current team’s Cages:

bash
ev cage list

cage logs

Open the Cage logs screen in the Evervault Dashboard for the named Cage:

bash
ev cage logs --name <cage_name>
  • The CLI must be able to launch a browser to open the logs screen.

cage run

Run a named Cage from the command line using provided flags as a payload:

bash
ev [cage] run [Flags] [Options] --name <cage_name>
  • This command does not encrypt the data before running the Cage.

Options

  • --name <cage_name> - the name of the Cage to run
  • --data <value> - the JSON payload to send to the Cage.

Relays

Use the following commands to manage your Relays.

relay run

Start a relay in development mode, pointing to a local server:

bash
ev relay run [Flags] [Options]

Options

  • --relay-domain <relay-domain> - The domain of the Relay you would like to run. Use this flag to prevent the input prompt.
  • --relay-uuid <relay-uuid> - The uuid of the Relay you would like to run. Use this flag to prevent the input prompt.
  • --target <target> - The target for your relay. Use this flag to prevent the input prompt.

relay create

Create a Relay:

bash
ev relay create [Flags] [Options]

Options

  • --target <target> - The target for your Relay. Use this flag to prevent the input prompt.
  • --fields <fields> - A JSON object containing the fields to encrypt. Requires ‘globalFields’ and ‘requestSpecificFields’ keys.
  • --file <file> - A path to a JSON file containing the fields to encrypt. Requires ‘globalFields’ and ‘requestSpecificFields’ keys.

Examples

Using --fields:

bash
ev relay create --target api.mysite.com --fields '{ "globalFields": ["$..ssn"], "requestSpecificFields": [{ "method": "POST", "route": "/register", "fields": ["$..phoneNumber"] }] }'

Using --file:

bash
ev relay create --target api.mysite.com --file ./relay-conf.json

relay delete

Delete a Relay:

bash
ev relay delete [Flags] [Options]

Options

  • --domain <domain> - the subdomain of the relay to delete at relay.evervault.com

relay list

List your Relays:

bash
ev relay list [Flags]

relay publish

Publish your current local Relay configuration to a production Relay.

bash
ev relay publish [FLAGS]

relay update

Update one of your Relays:

bash
ev relay update [FLAGS] [OPTIONS]

Options

  • --domain <domain> - The subdomain of the relay to update at relay.evervault.com
  • --fields <fields> - A JSON object containing the fields to encrypt. Requires 'globalFields' and 'requestSpecificFields' keys.
  • --file <file> - A path to a JSON file containing the fields for your local relay to encrypt. Requires 'globalFields' and 'requestSpecificFields' keys.

Teams

Use the following commands to manage the teams that you’re a member of.

team list

List all teams that your account has access to:

bash
ev team list

team switch

Switch the team you’re working on in the CLI:

bash
ev team switch [Flags] [Options]

Options

  • --uuid <uuid> - The uuid of the team to switch to

Support

help

Display help for the Evervault CLI:

bash
ev [Subcommand] help

info

View information about your current session in the Evervault CLI:

bash
ev info [Flags]

reset

Factory reset of the Evervault CLI:

bash
ev reset [Flags]
  • reset will wipe all local data.

Misc.

dash

Open your browser on the Evervault dashboard:

bash
ev dash
  • The CLI must be able to launch a browser to bring you to the dashboard.

docs

Open your browser on the Evervault documentation site:

bash
ev docs

Was this page useful?